-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
68 lines (55 loc) · 1.3 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
plugins {
idea
`maven-publish`
kotlin("jvm") version libs.versions.kotlin.get()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(libs.kotlinx.coroutines)
implementation(libs.kotlinx.coroutines.jdk8)
implementation(libs.guava)
testImplementation(kotlin("test"))
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
}
}
tasks {
java {
withSourcesJar()
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
}
compileKotlin {
kotlinOptions {
val key = "-Xjvm-default="
freeCompilerArgs = freeCompilerArgs.filterNot { it.startsWith(key) } + listOf(key + "all")
}
}
build {
doLast {
jar.get().archiveFile.get().asFile.delete()
}
}
test {
useJUnitPlatform()
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
artifactId = "lib"
}
}
repositories {
maven("https://repo.plasmoverse.com/snapshots") {
name = "PlasmoVerseSnapshots"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}