1
1
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2
+ import org.jetbrains.kotlin.konan.properties.Properties
2
3
3
4
plugins {
4
5
`maven- publish`
5
- kotlin(" jvm" ) version " 1.4.10 "
6
+ kotlin(" jvm" ) version " 1.5.21 "
6
7
}
7
8
8
9
group = " me.theevilroot"
@@ -14,7 +15,7 @@ repositories {
14
15
}
15
16
16
17
dependencies {
17
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2 " )
18
+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1 " )
18
19
testImplementation(" junit:junit:4.13" )
19
20
}
20
21
@@ -24,13 +25,35 @@ val sourcesJar by tasks.registering(Jar::class) {
24
25
}
25
26
26
27
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
+ }
27
43
publications {
28
44
create<MavenPublication >(" maven" ) {
29
45
groupId = " me.theevilroot"
30
46
artifactId = " coroutine-async-socket"
31
47
version = version
32
48
from(components[" java" ])
33
49
}
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
+ }
34
57
register(" mavenJava" , MavenPublication ::class ) {
35
58
from(components[" java" ])
36
59
artifact(sourcesJar.get())
0 commit comments