mirror of
https://github.com/Zoinkwiz/quest-helper.git
synced 2025-12-23 14:38:43 -05:00
86 lines
2.4 KiB
Groovy
86 lines
2.4 KiB
Groovy
plugins {
|
|
id 'java'
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven {
|
|
url = 'https://repo.runelite.net'
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
def runeLiteVersion = "latest." + (project.hasProperty("use.snapshot") ? "integration" : "release")
|
|
|
|
compileOnly group: 'net.runelite', name:'client', version: runeLiteVersion
|
|
|
|
compileOnly 'org.projectlombok:lombok:1.18.30'
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.30'
|
|
|
|
// 23.0.0 is verified by RuneLite
|
|
compileOnly 'org.jetbrains:annotations:23.0.0'
|
|
|
|
testImplementation group: 'net.runelite', name:'client', version: runeLiteVersion
|
|
testImplementation group: 'net.runelite', name:'jshell', version: runeLiteVersion
|
|
|
|
def junitVersion = "5.5.2" // max version before junit-bom was added to pom files, due to runelite restrictions
|
|
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-api", version: junitVersion
|
|
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-params", version: junitVersion
|
|
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-engine", version: junitVersion
|
|
|
|
testImplementation "org.mockito:mockito-core:5.17.0"
|
|
testImplementation(group: 'com.google.inject.extensions', name:'guice-testlib', version: "4.1.0") {
|
|
exclude group: 'com.google.inject', module: 'guice' // already provided by runelite
|
|
}
|
|
}
|
|
|
|
group = 'com.questhelper'
|
|
version = '4.12.1.1'
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
tasks.withType(Test).configureEach {
|
|
maxHeapSize = "3g"
|
|
minHeapSize = "512m"
|
|
jvmArgs = [
|
|
"-XX:ReservedCodeCacheSize=512m",
|
|
"-XX:MaxMetaspaceSize=1g"
|
|
]
|
|
testLogging.showStandardStreams = true
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
|
|
tasks.register("shadowJar", Jar) {
|
|
dependsOn configurations.testRuntimeClasspath
|
|
manifest {
|
|
attributes("Main-Class": "com.questhelper.QuestHelperPluginTest")
|
|
}
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
from sourceSets.main.output
|
|
from sourceSets.test.output
|
|
from {
|
|
configurations.testRuntimeClasspath.collect { file ->
|
|
file.isDirectory() ? file : zipTree(file)
|
|
}
|
|
}
|
|
|
|
exclude "META-INF/INDEX.LIST"
|
|
exclude "META-INF/*.SF"
|
|
exclude "META-INF/*.DSA"
|
|
exclude "META-INF/*.RSA"
|
|
exclude "**/module-info.class"
|
|
|
|
group = BasePlugin.BUILD_GROUP
|
|
archiveClassifier.set("shadow")
|
|
archiveFileName.set("${rootProject.name}-${project.version}-all.jar")
|
|
}
|