@@ -3,25 +3,28 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
33plugins {
44 id ' java'
55 id ' idea'
6+ id ' eclipse'
67 id ' maven-publish'
7- alias libs. plugins. licenser
88 alias libs. plugins. gradleutils
9+ alias libs. plugins. gitversion
10+ alias libs. plugins. changelog
11+ alias libs. plugins. licenser
912 alias libs. plugins. shadow
10- // alias libs.plugins.modules
1113}
1214
13- final projectDisplayName = ' Minecraft Mavenizer'
14- final projectArtifactId = base. archivesName = ' minecraft-mavenizer'
15- final projectVendor = ' Forge Development LLC'
15+ gradleutils. displayName = ' Minecraft Mavenizer'
1616description = ' A pure-blooded Java tool to generate a maven repository for Minecraft artifacts.'
1717group = ' net.minecraftforge'
1818version = gitversion. tagOffset
1919
2020println " Version: $version "
2121
22+ // TODO [Mavenizer] Update to Java 25 once ForgeGradle and ForgeDev target Gradle 9.1.0
2223java. toolchain. languageVersion = JavaLanguageVersion . of(21 )
2324
2425dependencies {
26+ compileOnly libs. nulls
27+
2528 implementation libs. jopt
2629 implementation libs. gson
2730 implementation libs. jver
@@ -32,20 +35,8 @@ dependencies {
3235 implementation libs. commonsio
3336
3437 implementation libs. bundles. utils
35-
36- // Static Analysis
37- compileOnly libs. nulls
3838}
3939
40- /* Can't do modules yet with JavaProvisioner having JavaProbe in the root package.
41- extraJavaModuleInfo {
42- failOnMissingModuleInfo = false
43- //skipLocalJars = true
44-
45- automaticModule(libs.diff, 'io.codechicken.diffpatch')
46- }
47- */
48-
4940license {
5041 header = rootProject. file(' LICENSE-header.txt' )
5142 newLine false
@@ -55,17 +46,11 @@ license {
5546tasks. named(' jar' , Jar ) {
5647 manifest {
5748 attributes([
58- ' Main-Class' : ' net.minecraftforge.mcmaven.cli.Main' ,
49+ ' Main-Class' : ' net.minecraftforge.mcmaven.cli.Main' ,
5950 ' Automatic-Module-Name' : ' net.minecraftforge.mavenizer'
6051 ])
61- attributes([
62- ' Specification-Title' : projectDisplayName,
63- ' Specification-Vendor' : projectVendor,
64- ' Specification-Version' : gitversion. info. tag,
65- ' Implementation-Title' : projectDisplayName,
66- ' Implementation-Vendor' : projectVendor,
67- ' Implementation-Version' : project. version
68- ], ' net/minecraftforge/mcmaven/cli/' )
52+
53+ gradleutils. manifestDefaults(it, ' net/minecraftforge/mcmaven/cli/' )
6954 }
7055
7156 archiveClassifier = ' slim'
@@ -75,28 +60,26 @@ tasks.named('shadowJar', ShadowJar) {
7560 archiveClassifier = ' '
7661}
7762
78- tasks. withType(JavaCompile ). configureEach {
79- options. encoding = ' UTF-8'
80- options. compilerArgs. addAll([' --module-version' , project. version]);
81- }
82-
8363changelog {
8464 fromBase()
85- publishAll = false
8665}
8766
8867publishing {
68+ repositories {
69+ maven gradleutils. publishingForgeMaven
70+ }
71+
8972 publications. register(' mavenJava' , MavenPublication ) {
9073 from components. shadow
9174
92- artifactId = projectArtifactId
93- changelog . publish it
75+ changelog . publish(it)
76+ gradleutils . promote(it)
9477
9578 pom { pom ->
96- name = projectDisplayName
79+ name = gradleutils . displayName
9780 description = project. description
9881
99- gradleutils. pom. setGitHubDetails pom
82+ gradleutils. pom. addRemoteDetails( pom)
10083
10184 licenses {
10285 license gradleutils.pom.licenses.LGPLv2_1
@@ -108,10 +91,4 @@ publishing {
10891 }
10992 }
11093 }
111-
112- repositories {
113- maven gradleutils. publishingForgeMaven
114- }
11594}
116-
117- idea. module { downloadSources = downloadJavadoc = true }
0 commit comments