11import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+ import org.jetbrains.kotlin.konan.properties.Properties
23
34plugins {
45 `maven- publish`
5- kotlin(" jvm" ) version " 1.4.10 "
6+ kotlin(" jvm" ) version " 1.5.21 "
67}
78
89group = " me.theevilroot"
@@ -14,7 +15,7 @@ repositories {
1415}
1516
1617dependencies {
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
2627publishing {
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())
0 commit comments