forked from Do-next-day/skiko-util
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
60 lines (50 loc) · 1.49 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version Versions.kotlin
kotlin("kapt") version Versions.kotlin
kotlin("plugin.serialization") version Versions.kotlin
id("me.him188.maven-central-publish") version "1.0.0-dev-3"
}
allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
group = Versions.group
version = Versions.version
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
// kotlin
implementation(kotlinx("coroutines-core-jvm", "1.6.4"))
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "me.him188.maven-central-publish")
kotlin {
jvmToolchain(11)
}
mavenCentralPublish {
useCentralS01()
singleDevGithubProject("4o4E", "skiko-util")
licenseGplV3()
workingDir = buildDir.resolve("publishing-tmp")
}
tasks {
assemble {
doLast {
val jar = rootProject.projectDir.resolve("jar")
jar.mkdir()
println("==== copy ====")
for (file in project.buildDir.resolve("libs").listFiles() ?: emptyArray()) {
if ("source" in file.name) continue
println("正在复制`${file.path}`")
file.copyTo(jar.resolve(file.name), true)
}
}
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
}
}