diff options
author | Deftu <deftudev@gmail.com> | 2023-08-25 12:29:52 +0200 |
---|---|---|
committer | Deftu <deftudev@gmail.com> | 2023-08-25 12:29:52 +0200 |
commit | 874d4d98acd0b5f22e751aac43c8d7ed6da2f557 (patch) | |
tree | 4030dad26d4bab6363033325b1d96b855774ddf3 | |
parent | fcd760df97454eeed436334808da51ea9ba20540 (diff) | |
download | Remap-874d4d98acd0b5f22e751aac43c8d7ed6da2f557.tar.gz Remap-874d4d98acd0b5f22e751aac43c8d7ed6da2f557.tar.bz2 Remap-874d4d98acd0b5f22e751aac43c8d7ed6da2f557.zip |
Add repository and bump version
-rw-r--r-- | build.gradle.kts | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index d8ccda8..5b28178 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ tasks.withType<KotlinCompile>().configureEach { } group = "com.github.replaymod" -version = "SNAPSHOT" +version = "0.1.0" repositories { mavenCentral() @@ -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.xyz/releases") + applyCredentials() + } + + maven { + name = "DeftuSnapshots" + url = uri("https://maven.deftu.xyz/snapshots") + applyCredentials() + } + } + } } tasks.test { |