plugins { id 'java' id 'java-library' id 'maven-publish' id 'gsl-starplane' version '0.2.0-a20240713.1' } group 'de.geolykt' // Hint: The version is defined in the gradle.properties file! base { archivesName = 's2dmenues' } targetCompatibility = compileJava.targetCompatibility = sourceCompatibility = compileJava.sourceCompatibility = '1.8' repositories { maven { name 'stianloader-maven' url 'https://stianloader.org/maven' } maven { name 'jitpack' url 'https://jitpack.io' } mavenCentral() mavenLocal() } starplane { withRAS(rootProject.file("src/main/resources/s2dmenues.ras")) mappingsFile("tinyv2", "newStarmap.tinyv2") } runMods { from jar systemProperties.put("org.stianloader.sll.log.MIRROR_MAVEN_REQUESTS", true) systemProperties.put("org.stianloader.sll.log.level", "DEBUG") systemProperties.put("classloader.dump", true) systemProperties.put("org.stianloader.micromixin.debug", false) } configurations { dependencyMods compileOnlyApi.extendsFrom(dependencyMods) compileOnlyApi.extendsFrom(devRuntime) compileOnlyApi.extendsFrom(galimulatorDependencies) } deployMods { from configurations["dependencyMods"] remapMods = true } dependencies { dependencyMods("de.geolykt:starloader-api:2.0.0-a20240728.1:remapped") devRuntime "org.stianloader:launcher-micromixin:4.0.0-a20240731" compileOnly "org.stianloader:micromixin-annotations:0.6.2-a20240731" compileOnly "de.geolykt.starloader:starplane-annotations:1.0.0" compileOnlyApi "org.jetbrains:annotations:24.1.0" compileOnly("com.github.raeleus.TenPatch:tenpatch:$tenpatchVersion") { exclude group: 'com.badlogicgames.gdx', module: 'gdx' } // https://mvnrepository.com/artifact/com.maltaisn/msdf-gdx compileOnly("com.maltaisn:msdf-gdx:$msdfVersion") { exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8' exclude group: 'com.badlogicgames.gdx', module: 'gdx' } } processResources { filesMatching("extension.json") { expand(project.properties) } } genEclipseRuns { propertyExpansionSource = project.file("gradle.properties") } 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() } } }