-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
96 lines (82 loc) · 2.52 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
`java-library`
`maven-publish`
}
tasks.jar {
enabled = false
}
allprojects {
group = "io.github.eutro.jwasm"
version = "${properties["ver_major"]}.${properties["ver_minor"]}.${properties["ver_patch"]}"
}
subprojects {
apply<JavaLibraryPlugin>()
apply<MavenPublishPlugin>()
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation(project(":jwasm-test"))
implementation("org.jetbrains:annotations:20.1.0")
if (path != ":jwasm") {
implementation(project(":jwasm"))
}
}
tasks.test {
useJUnitPlatform()
testLogging {
events(TestLogEvent.STARTED)
exceptionFormat = TestExceptionFormat.FULL
showStackTraces = true
}
}
tasks.register<Jar>("sourceJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
publishing {
repositories {
maven {
name = "eutroDev"
url = uri("https://maven.eutro.dev/releases")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
register<MavenPublication>("maven") {
from(components.named("java").get())
artifact(tasks["sourceJar"])
}
}
}
}
project(":jwasm-analysis") {
dependencies {
implementation(project(":jwasm-tree"))
implementation(project(":jwasm-attrs"))
}
}
val javadocModules = listOf(":jwasm", ":jwasm-tree", ":jwasm-attrs", ":jwasm-analysis", ":jwasm-sexp")
tasks.javadoc {
setDestinationDir(file("docs"))
val javadocTasks = javadocModules.map { project(it).tasks.javadoc.get() }
source = files(*javadocTasks.flatMap { it.source }.toTypedArray()).asFileTree
classpath = files(*javadocTasks.flatMap { it.classpath }.toTypedArray())
(options as StandardJavadocDocletOptions).run {
locale("en")
links(
"https://docs.oracle.com/javase/8/docs/api",
)
}
}