Skip to content

Commit 26bfc8e

Browse files
authored
Update build setup, Gradle 8.10.2 (#66)
* Use Java 17 as a minimum everywhere, CoreMods itself is compiled with Java 17 already, so testing with Java 16 doesn't make sense. * Use lazy task configuration for jar manifest attributes * Minor cleanup to valid VMs versions * Update licencer, enable configuration caching
1 parent 2c5b795 commit 26bfc8e

File tree

6 files changed

+31
-33
lines changed

6 files changed

+31
-33
lines changed

build.gradle

+18-21
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import net.minecraftforge.gradleutils.PomUtils
22

33
plugins {
4-
id 'org.cadixdev.licenser' version '0.6.1'
4+
id 'net.minecraftforge.licenser' version '1.0.1'
55
id 'idea'
66
id 'eclipse'
77
id 'java-library'
88
id 'maven-publish'
9-
id 'net.minecraftforge.gradleutils' version '[2.1.2,2.3.0)'
9+
id 'net.minecraftforge.gradleutils' version '[2.1.3,2.3.0)'
1010
}
1111

1212
group 'net.minecraftforge'
1313
version = gradleutils.tagOffsetVersion
14-
println("Version: $version")
14+
println "Version: $version"
1515

1616
java {
1717
toolchain.languageVersion = JavaLanguageVersion.of(17)
@@ -55,7 +55,7 @@ dependencies {
5555
compileOnly(libs.nulls)
5656
}
5757

58-
jar {
58+
tasks.named('jar', Jar) {
5959
manifest {
6060
attributes([
6161
'Specification-Title': 'coremods',
@@ -64,7 +64,7 @@ jar {
6464
'Implementation-Title': project.name,
6565
'Implementation-Version': project.version,
6666
'Implementation-Vendor' :'Forge Development LLC'
67-
] as java.util.LinkedHashMap, 'net/minecraftforge/coremod/')
67+
], 'net/minecraftforge/coremod/')
6868
}
6969
}
7070

@@ -93,22 +93,19 @@ publishing {
9393

9494
allprojects {
9595
ext.VALID_VMS = [
96-
'Adoptium': [16, 17, 18, 19, 20, 21],
97-
'Amazon': [16, 17, 18, 19, 20, 21],
98-
'Azul': (16..21),
99-
'BellSoft': (16..21),
100-
'Graal_VM': [16, 17, 19, 20, 21],
101-
'IBM': [16, 17, 18, 19, 20 ],
102-
'Microsoft': [16, 17, 21],
103-
'Oracle': (16..21),
104-
'SAP': (16..20)
96+
'Adoptium': (17..21),
97+
'Amazon': (17..21),
98+
'Azul': (17..21),
99+
'BellSoft': (17..21),
100+
'Graal_VM': [17, 19, 20, 21],
101+
'IBM': [17, 18, 19, 20 ],
102+
'Microsoft': [17, 21],
103+
'Oracle': (17..21),
104+
'SAP': (17..20)
105105
]
106-
ext.VALID_VMS = [ 'Adoptium': [16] ]
106+
ext.VALID_VMS = [ 'Adoptium': [17] ]
107107
}
108108

109-
idea {
110-
module {
111-
downloadJavadoc = true
112-
downloadSources = true
113-
}
114-
}
109+
idea.module {
110+
downloadJavadoc = downloadSources = true
111+
}

coremods-test-jar/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
2-
id 'org.cadixdev.licenser' version '0.6.1'
2+
id 'net.minecraftforge.licenser' version '1.0.1'
33
id 'eclipse'
44
id 'java-library'
5-
id 'net.minecraftforge.gradleutils' version '[2.1.2,2.3.0)'
5+
id 'net.minecraftforge.gradleutils' version '[2.1.3,2.3.0)'
66
}
77

88
repositories {
@@ -12,7 +12,7 @@ repositories {
1212
}
1313

1414
java {
15-
toolchain.languageVersion = JavaLanguageVersion.of(16)
15+
toolchain.languageVersion = JavaLanguageVersion.of(17)
1616
}
1717

1818
license {
@@ -23,4 +23,4 @@ license {
2323
eclipse.classpath {
2424
containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
2525
file.whenMerged { entries.findAll { it.kind == 'lib' || it.path == 'org.eclipse.buildship.core.gradleclasspathcontainer' }.each { it.entryAttributes['module'] = 'true' } }
26-
}
26+
}

coremods-test/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
plugins {
2-
id 'org.cadixdev.licenser' version '0.6.1'
2+
id 'net.minecraftforge.licenser' version '1.0.1'
33
id 'eclipse'
44
id 'java-library'
5-
id 'org.gradlex.extra-java-module-info' version '1.4.2'
6-
id 'net.minecraftforge.gradleutils' version '[2.1.2,2.3.0)'
5+
id 'org.gradlex.extra-java-module-info' version '1.9'
6+
id 'net.minecraftforge.gradleutils' version '[2.1.3,2.3.0)'
77
}
88

99
repositories {
@@ -99,4 +99,4 @@ if (project.hasProperty('javaVendor') && project.hasProperty('javaVersion')) {
9999
eclipse.classpath {
100100
containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
101101
file.whenMerged { entries.findAll { it.kind == 'lib' || it.path == 'org.eclipse.buildship.core.gradleclasspathcontainer' }.each { it.entryAttributes['module'] = 'true' } }
102-
}
102+
}

gradle.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
org.gradle.caching=true
2-
org.gradle.parallel=true
2+
org.gradle.parallel=true
3+
org.gradle.configuration-cache=true

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pluginManagement {
66
}
77

88
plugins {
9-
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
9+
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
1010
}
1111

1212
dependencyResolutionManagement {
@@ -45,4 +45,4 @@ dependencyResolutionManagement {
4545

4646
rootProject.name = 'CoreMods'
4747
include 'coremods-test'
48-
include 'coremods-test-jar'
48+
include 'coremods-test-jar'

0 commit comments

Comments
 (0)