11plugins {
22 id ' java'
3- id " com.github.johnrengelman.shadow" version " 8.1.1"
3+ id ' idea'
4+ id ' com.gradleup.shadow' version ' 9.3.1'
45}
56tasks. build. dependsOn(' shadowJar' )
67
78group ' com.nickuc.antimalware'
89version ' 1.0-SNAPSHOT'
910
11+ def targetJavaVersion = 8
12+ java {
13+ def javaVersion = JavaVersion . toVersion(targetJavaVersion)
14+ sourceCompatibility = javaVersion
15+ targetCompatibility = javaVersion
16+ if (JavaVersion . current() < javaVersion) {
17+ toolchain. languageVersion = JavaLanguageVersion . of(targetJavaVersion)
18+ }
19+ disableAutoTargetJvm()
20+ }
21+
22+ tasks. withType(JavaCompile ). configureEach {
23+ options. encoding = ' UTF-8'
24+ }
25+
1026repositories {
1127 mavenCentral()
1228}
1329
1430dependencies {
1531 def asmVersion = " 9.9.1"
16- compile ' org.ow2.asm:asm:' + asmVersion
17- compile ' org.ow2.asm:asm-commons:' + asmVersion
18- compile ' org.ow2.asm:asm-tree:' + asmVersion
32+ implementation ' org.ow2.asm:asm:' + asmVersion
33+ implementation ' org.ow2.asm:asm-commons:' + asmVersion
34+ implementation ' org.ow2.asm:asm-tree:' + asmVersion
1935
2036 def lombok = ' org.projectlombok:lombok:1.18.42'
2137 compileOnly lombok
@@ -32,13 +48,11 @@ jar {
3248 }
3349}
3450
35- shadowJar {
36- archiveName(" HostflowMalwareRemover.jar" )
51+ tasks. shadowJar {
52+ dependsOn tasks. compileJava
53+ archiveFileName = ' HostflowMalwareRemover.jar'
3754}
3855
39- compileJava {
40- options. encoding(' UTF-8' )
41-
42- sourceCompatibility(' 1.8' )
43- targetCompatibility(' 1.8' )
44- }
56+ tasks. build {
57+ dependsOn tasks. shadowJar
58+ }
0 commit comments