aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorDeftu <deftudev@gmail.com>2023-08-25 12:29:52 +0200
committerDeftu <deftudev@gmail.com>2023-08-25 12:29:52 +0200
commit874d4d98acd0b5f22e751aac43c8d7ed6da2f557 (patch)
tree4030dad26d4bab6363033325b1d96b855774ddf3 /build.gradle.kts
parentfcd760df97454eeed436334808da51ea9ba20540 (diff)
downloadRemap-874d4d98acd0b5f22e751aac43c8d7ed6da2f557.tar.gz
Remap-874d4d98acd0b5f22e751aac43c8d7ed6da2f557.tar.bz2
Remap-874d4d98acd0b5f22e751aac43c8d7ed6da2f557.zip
Add repository and bump version
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts35
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 {