plugins { id("java") id("maven-publish") } group = "com.r35157.driver" version = project.findProperty("version") ?: "UNSET" if (version == "UNSET" && gradle.startParameter.taskNames.any { it.startsWith("publish") }) { throw GradleException("You must set -Pversion=... (use publish.sh / publishCICD.sh)") } repositories { mavenLocal() maven { name = "Artifacts" url = uri("/mnt/artifacts/java") // Failsafe for Android variant-aware deps + klassiske Maven-artefakter: metadataSources { gradleMetadata() // bevar .module for Android/AAR varianter mavenPom() artifact() } } mavenCentral() } dependencies { // The JUnit platform will not be included in the JAR file but are needed for running the tests: testImplementation(platform("org.junit:junit-bom:6.0.2")) testImplementation("org.junit.jupiter:junit-jupiter") testRuntimeOnly("org.junit.platform:junit-platform-launcher") compileOnly("org.jetbrains:annotations:26.0.2-1") implementation("com.r35157.driver:ledsign-api:0.0-dev") } java { toolchain { languageVersion.set(JavaLanguageVersion.of(25)) } } tasks.withType().configureEach { options.release.set(25) } publishing { publications { create("mavenJava") { from(components["java"]) } } repositories { maven { name = "Artifacts" url = uri("/mnt/artifacts/java") } } }