-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle.kts
104 lines (91 loc) · 2.84 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
plugins {
kotlin("jvm") version "2.0.10"
java
`java-library`
`maven-publish`
}
val dependencyAsm by extra("9.7.1")
val dependencyFastJSON2 by extra("2.0.54")
val dependencySlf4j by extra("2.0.9")
group = "com.IceCreamQAQ.Rain"
version = "1.0.0-DEV2"
allprojects {
repositories {
mavenLocal()
mavenCentral()
maven("https://maven.icecreamqaq.com/repository/maven-public/")
}
}
subprojects {
apply {
plugin("java")
plugin("java-library")
plugin("maven-publish")
plugin("org.jetbrains.kotlin.jvm")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlin {
jvmToolchain(8)
}
dependencies {
api(kotlin("stdlib"))
api(kotlin("reflect"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
}
java {
withSourcesJar()
}
configure<PublishingExtension> {
publications {
create<MavenPublication>(name) {
groupId = "com.IceCreamQAQ.Rain"
artifactId = name
version = rootProject.version.toString()
pom {
name.set("Rain Java Dev Framework")
description.set("Rain Java Dev Framework")
url.set("https://github.com/IceCream-Open/Rain")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("IceCream")
name.set("IceCream")
email.set("[email protected]")
}
}
scm {
connection.set("")
}
}
from(components["java"])
}
repositories {
mavenLocal()
maven {
val snapshotsRepoUrl = "https://maven.icecreamqaq.com/repository/maven-snapshots/"
val releasesRepoUrl = "https://maven.icecreamqaq.com/repository/maven-releases/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
System.getenv("MAVEN_USER")?.let { username = it }
System.getenv("MAVEN_TOKEN")?.let { password = it }
}
}
}
}
}
tasks {
test {
useJUnitPlatform {
excludeEngines("junit-jupiter")
}
}
}
}