diff --git a/.gitignore b/.gitignore index d551f1e..a54bf2a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .gradle/ build/ out/ +local.properties \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 396e181..a686f53 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.konan.properties.Properties plugins { `maven-publish` - kotlin("jvm") version "1.4.10" + kotlin("jvm") version "1.5.21" } group = "me.theevilroot" @@ -14,7 +15,7 @@ repositories { } dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1") testImplementation("junit:junit:4.13") } @@ -24,6 +25,21 @@ val sourcesJar by tasks.registering(Jar::class) { } publishing { + repositories { + maven { + val localProps = Properties() + if (rootProject.file("local.properties").exists()) + localProps.load(rootProject.file("local.properties").reader()) + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/TheEvilRoot/async-coroutines-socket") + credentials { + username = localProps.getOrDefault("gpr.user", + System.getenv("USERNAME")) as? String? + password = localProps.getOrDefault("gpr.key", + System.getenv("TOKEN")) as? String? + } + } + } publications { create("maven") { groupId = "me.theevilroot" @@ -31,6 +47,13 @@ publishing { version = version from(components["java"]) } + register("gpr") { + groupId = "me.theevilroot" + artifactId = "coroutine-async-socket" + version = version + from(components["java"]) + artifact(sourcesJar.get()) + } register("mavenJava", MavenPublication::class) { from(components["java"]) artifact(sourcesJar.get()) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 12d38de..da9702f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists