@@ -19,11 +19,13 @@ buildscript{
1919
2020plugins{
2121 java
22+ `maven- publish`
2223}
2324
2425val arcVersion: String by project
2526val mindustryVersion: String by project
2627val mindustryBEVersion: String by project
28+ val entVersion: String by project
2729
2830val modName: String by project
2931val modArtifact: String by project
@@ -42,6 +44,10 @@ fun mindustry(module: String): String{
4244 return " com.github.Anuken.Mindustry$module :$mindustryVersion "
4345}
4446
47+ fun entity (module : String ): String {
48+ return " com.github.GlennFolker.EntityAnno$module :$entVersion "
49+ }
50+
4551allprojects{
4652 apply (plugin = " java" )
4753 sourceSets[" main" ].java.setSrcDirs(listOf (layout.projectDirectory.dir(" src" )))
@@ -57,11 +63,17 @@ allprojects{
5763 }
5864 }
5965
66+ dependencies{
67+ // Downgrade Java 9+ syntax into being available in Java 8.
68+ annotationProcessor(entity(" :downgrader" ))
69+ }
70+
6071 repositories{
6172 // Necessary Maven repositories to pull dependencies from.
6273 mavenCentral()
6374 maven(" https://oss.sonatype.org/content/repositories/snapshots/" )
6475 maven(" https://oss.sonatype.org/content/repositories/releases/" )
76+ maven(" https://raw.githubusercontent.com/GlennFolker/EntityAnnoMaven/main" )
6577
6678 // Use Zelaux's non-buggy repository for release Mindustry and Arc builds.
6779 if (! useJitpack) maven(" https://raw.githubusercontent.com/Zelaux/MindustryRepo/master/repository" )
@@ -81,6 +93,26 @@ allprojects{
8193 }
8294}
8395
96+ fun commonPom (pom : MavenPom ){
97+ pom.apply {
98+ url = " https://github.com/ThePythonGuy3/CustomJSONLibMaven"
99+ inceptionYear = " 2025"
100+
101+ licenses{
102+ license{
103+ name = " GPL-3.0-or-later"
104+ url = " https://www.gnu.org/licenses/gpl-3.0.en.html"
105+ distribution = " repo"
106+ }
107+ }
108+
109+ issueManagement{
110+ system = " GitHub Issue Tracker"
111+ url = " https://github.com/ThePythonGuy3/CustomJSONLibMaven/issues"
112+ }
113+ }
114+ }
115+
84116project(" :" ){
85117 dependencies{
86118 compileOnly(mindustry(" :core" ))
@@ -96,7 +128,6 @@ project(":"){
96128 files(sourceSets[" main" ].output.resourcesDir),
97129 configurations.runtimeClasspath.map{conf -> conf.map{if (it.isDirectory) it else zipTree(it)}},
98130
99- files(layout.projectDirectory.dir(" assets" )),
100131 layout.projectDirectory.file(" icon.png" ),
101132 meta
102133 )
@@ -125,7 +156,7 @@ project(":"){
125156 }
126157 }
127158
128- val lib = tasks.register<Jar >(" lib" ){
159+ tasks.register<Jar >(" lib" ){
129160 archiveFileName = " $modArtifact .jar"
130161
131162 from(
@@ -195,4 +226,20 @@ project(":"){
195226 logger.lifecycle(" Copied :jar output to $folder ." )
196227 }
197228 }
198- }
229+
230+ publishing.publications.register<MavenPublication >(" maven" )
231+ {
232+ artifact(tasks[" lib" ])
233+
234+ groupId = " com.github.ThePythonGuy3.CustomJSONLib"
235+ artifactId = " pyguy.jsonlib"
236+
237+ pom{
238+ name = " CustomJSONLib Maven Library"
239+
240+ description = " CustomJSONLib Library required to compile Mindustry mods using CustomJSONLib."
241+
242+ commonPom(this )
243+ }
244+ }
245+ }
0 commit comments