Skip to content

Commit 555a325

Browse files
committed
github packages publish. update kotlin and gradle wrapper
1 parent d8d74a1 commit 555a325

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.gradle/
44
build/
55
out/
6+
local.properties

build.gradle.kts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
import org.jetbrains.kotlin.konan.properties.Properties
23

34
plugins {
45
`maven-publish`
5-
kotlin("jvm") version "1.4.10"
6+
kotlin("jvm") version "1.5.21"
67
}
78

89
group = "me.theevilroot"
@@ -14,7 +15,7 @@ repositories {
1415
}
1516

1617
dependencies {
17-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
18+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
1819
testImplementation("junit:junit:4.13")
1920
}
2021

@@ -24,13 +25,35 @@ val sourcesJar by tasks.registering(Jar::class) {
2425
}
2526

2627
publishing {
28+
repositories {
29+
maven {
30+
val localProps = Properties()
31+
if (rootProject.file("local.properties").exists())
32+
localProps.load(rootProject.file("local.properties").reader())
33+
name = "GitHubPackages"
34+
url = uri("https://maven.pkg.github.com/TheEvilRoot/async-coroutines-socket")
35+
credentials {
36+
username = localProps.getOrDefault("gpr.user",
37+
System.getenv("USERNAME")) as? String?
38+
password = localProps.getOrDefault("gpr.key",
39+
System.getenv("TOKEN")) as? String?
40+
}
41+
}
42+
}
2743
publications {
2844
create<MavenPublication>("maven") {
2945
groupId = "me.theevilroot"
3046
artifactId = "coroutine-async-socket"
3147
version = version
3248
from(components["java"])
3349
}
50+
register<MavenPublication>("gpr") {
51+
groupId = "me.theevilroot"
52+
artifactId = "coroutine-async-socket"
53+
version = version
54+
from(components["java"])
55+
artifact(sourcesJar.get())
56+
}
3457
register("mavenJava", MavenPublication::class) {
3558
from(components["java"])
3659
artifact(sourcesJar.get())
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)