plugins { id 'java' id 'java-library' id 'gsl-starplane' version '0.2.2-a20250819' id 'maven-publish' } group = 'de.geolykt' // Note: Version is defined in the gradle.properties file java.targetCompatibility = compileJava.targetCompatibility = java.sourceCompatibility = compileJava.sourceCompatibility = '1.8' repositories { mavenLocal() maven { name = 'stianloader' url = 'https://stianloader.org/maven' } maven { name 'luck-repo' url 'https://repo.lucko.me/' content { includeModule 'me.lucko', 'spark-api' includeModule 'me.lucko', 'spark-common' } } mavenCentral() } starplane { eclipseEEA = rootProject.file("src/eclipse-eea") } runMods { from jar systemProperties.put("classloader.dump", true) systemProperties.put("org.stianloader.sll.log.MIRROR_MAVEN_REQUESTS", false) } configurations { dependencyMods compileOnlyApi.extendsFrom(dependencyMods) compileOnlyApi.extendsFrom(devRuntime) compileOnlyApi.extendsFrom(galimulatorDependencies) } deployMods { from configurations["dependencyMods"] } dependencies { // The versions of SLAPI are listed here: https://stianloader.org/maven/de/geolykt/starloader-api/ dependencyMods "de.geolykt:starloader-api:2.0.0-a20250912" // The versions of launcher-micromixin are listed here: https://stianloader.org/maven/org/stianloader/launcher-micromixin/ devRuntime "org.stianloader:launcher-micromixin:4.0.0-a20250922" // https://stianloader.org/maven/org/stianloader/micromixin-annotations/ compileOnly "org.stianloader:micromixin-annotations:0.8.0-a20250923" //compileOnly "de.geolykt.starloader:starplane-annotations:1.0.0" // https://mvnrepository.com/artifact/org.jetbrains/annotations compileOnlyApi "org.jetbrains:annotations:26.0.2-1" // https://nexus.lucko.me/service/rest/repository/browse/all/me/lucko/spark-common/ // Note: Downloaded at runtime (declared in the extension.json file) compileOnlyApi "me.lucko:spark-common:${sparkVersion}" } jar { into('META-INF/LICENSES/' + base.archivesName.get()) { from project.rootProject.file("LICENSE.txt") } } remapJar { archiveClassifier = 'remapped' fromJar jar } build { dependsOn remapJar } publish { dependsOn publishToMavenLocal // Gradle doesn't quite like this line but otherwise I get issues when publishing so what gives? } publishing { publications { plugin(MavenPublication) { publication -> groupId = project.group artifactId = project.base.archivesName.get() from components['java'] artifact remapJar } } repositories { if (System.getProperty('publishRepo') != null) { maven { url = System.getProperty('publishRepo') allowInsecureProtocol = true } } else { mavenLocal() } } } processResources { filesMatching("extension.json") { expand(project.properties) } } genEclipseRuns { propertyExpansionSource = project.file("gradle.properties") }