Skip to content

Commit 86448a8

Browse files
authored
modernize build gradle (#625)
* clear deprecation warnings * rename license when building * revert license rename
1 parent 80cfb46 commit 86448a8

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

build.gradle

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ plugins {
55
id 'com.github.breadmoirai.github-release' version '2.4.1'
66
}
77

8-
sourceCompatibility = JavaVersion.VERSION_21
9-
targetCompatibility = JavaVersion.VERSION_21
10-
11-
archivesBaseName = project.archives_base_name
12-
version = project.mod_version
13-
group = project.maven_group
8+
base {
9+
archivesName = project.archives_base_name
10+
version = project.mod_version
11+
group = project.maven_group
12+
}
1413

1514
sourceSets {
1615
codeGen
@@ -80,6 +79,8 @@ jar {
8079
from(configurations.includedLibrary.collect { it.isDirectory() ? it : zipTree(it) }) {
8180
include 'com/seedfinding/**'
8281
}
82+
83+
from("LICENSE")
8384
}
8485

8586
processResources {
@@ -98,6 +99,11 @@ processResources {
9899
}
99100
}
100101

102+
java {
103+
sourceCompatibility = JavaVersion.VERSION_21
104+
targetCompatibility = JavaVersion.VERSION_21
105+
}
106+
101107
tasks.withType(JavaCompile).configureEach {
102108
options.encoding = "UTF-8"
103109
}
@@ -108,10 +114,6 @@ tasks.register('sourcesJar', Jar) {
108114
from sourceSets.main.allSource
109115
}
110116

111-
jar {
112-
from "LICENSE"
113-
}
114-
115117
tasks.register('codeGen', JavaExec) {
116118
mainClass = 'net.earthcomputer.clientcommands.codegen.CodeGenerator'
117119
classpath = sourceSets.codeGen.runtimeClasspath

0 commit comments

Comments
 (0)