-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbuild.gradle.kts
68 lines (50 loc) · 1.38 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 {
java
id("com.github.johnrengelman.shadow").version("6.1.0")
`maven-publish`
}
repositories {
maven { url = uri("https://repo.ajg0702.us/releases/") }
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
mavenCentral()
}
allprojects {
version = "2.7.0"
group = "us.ajg0702"
plugins.apply("java")
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
ignoreFailures = false
failFast = true
maxParallelForks = (Runtime.getRuntime().availableProcessors() - 1).takeIf { it > 0 } ?: 1
reports.html.required.set(false)
reports.junitXml.required.set(false)
}
}
dependencies {
testImplementation("junit:junit:4.12")
implementation(project(":free"))
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifact(tasks["shadowJar"])
}
}
repositories {
val mavenUrl = "https://repo.ajg0702.us/releases"
if(!System.getenv("REPO_TOKEN").isNullOrEmpty()) {
maven {
url = uri(mavenUrl)
name = "ajRepo"
credentials {
username = "plugins"
password = System.getenv("REPO_TOKEN")
}
}
}
}
}