-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
56 lines (46 loc) · 1.49 KB
/
build.gradle.kts
File metadata and controls
56 lines (46 loc) · 1.49 KB
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
plugins {
java
`maven-publish`
}
group = "com.tcoded.lightlibs"
version = "0.0.2"
repositories {
mavenCentral()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.test {
useJUnitPlatform()
}
val enablePublishing: Boolean = project.findProperty("enablePublishing")?.toString()?.toBoolean() == true
if (enablePublishing) {
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories {
maven {
name = "reposilite"
url = uri("https://repo.tcoded.com/releases") // or /snapshots if applicable
credentials {
username = project.findProperty("REPOSILITE_USER")?.toString()
?: System.getenv("REPOSILITE_USER")
?: error("REPOSILITE_USER property or environment variable is not set")
password = project.findProperty("REPOSILITE_PASS")?.toString()
?: System.getenv("REPOSILITE_PASS")
?: error("REPOSILITE_PASS property or environment variable is not set")
}
authentication {
create<BasicAuthentication>("basic")
}
}
}
}
tasks.assemble {
dependsOn(tasks.publishToMavenLocal)
}
}