diff options
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 4215a6a..0a245b5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,8 +9,8 @@ tasks.withType<KotlinCompile>().configureEach { kotlinOptions.jvmTarget = "1.8" } -group = "com.github.replaymod" -version = "SNAPSHOT" +group = "dev.deftu" +version = "0.1.2" repositories { mavenCentral() @@ -27,7 +27,7 @@ kotlinVersion("1.9.0") dependencies { api("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.21") implementation(kotlin("stdlib")) - api("org.cadixdev:lorenz:0.5.0") + api("org.cadixdev:lorenz:0.5.8") runtimeOnly("net.java.dev.jna:jna:5.10.0") // don't strictly need this but IDEA spams log without testImplementation("org.junit.jupiter:junit-jupiter:5.7.1") @@ -48,6 +48,39 @@ publishing { from(components["java"]) } } + + val publishingUsername: String? = run { + return@run project.findProperty("deftu.publishing.username")?.toString() ?: System.getenv("DEFTU_PUBLISHING_USERNAME") + } + + val publishingPassword: String? = run { + return@run project.findProperty("deftu.publishing.password")?.toString() ?: System.getenv("DEFTU_PUBLISHING_PASSWORD") + } + + repositories { + mavenLocal() + if (publishingUsername != null && publishingPassword != null) { + fun MavenArtifactRepository.applyCredentials() { + authentication.create<BasicAuthentication>("basic") + credentials { + username = publishingUsername + password = publishingPassword + } + } + + maven { + name = "DeftuReleases" + url = uri("https://maven.deftu.dev/releases") + applyCredentials() + } + + maven { + name = "DeftuSnapshots" + url = uri("https://maven.deftu.dev/snapshots") + applyCredentials() + } + } + } } tasks.test { |