-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
87 lines (79 loc) · 2.34 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
import groovy.namespace.QName
import groovy.util.Node
import groovy.util.NodeList
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import java.util.regex.Pattern
plugins {
kotlin("jvm") version "2.0.0"
id("maven-publish")
id("com.ncorti.ktfmt.gradle") version "0.17.0"
id("org.jetbrains.dokka") version "1.9.20"
}
allprojects {
group = "org.pastalab.fray"
version = "0.1.4-SNAPSHOT"
}
repositories {
mavenCentral()
}
kotlin {
jvmToolchain(21)
}
configure(allprojects - project(":jvmti") - project(":instrumentation")) {
plugins.apply("com.ncorti.ktfmt.gradle")
afterEvaluate {
tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}
}
}
configure(allprojects - rootProject - project(":instrumentation")) {
plugins.apply("maven-publish")
plugins.apply("org.jetbrains.dokka")
afterEvaluate {
java {
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
val os = DefaultNativePlatform.getCurrentOperatingSystem().toFamilyName()
val arch = DefaultNativePlatform.getCurrentArchitecture().name
pom {
name = "Fray Testing Framework"
description = "Fray testing framework for concurrency programs."
url = "github.com/cmu-pasta/fray"
licenses {
license {
name = "GPL-3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.html"
}
}
}
afterEvaluate {
val shadowJar = tasks.findByName("shadowJar")
if (shadowJar == null) from(components["java"])
else artifact(shadowJar)
}
if (project.name != "jvmti") {
artifact(tasks["dokkaJavadocJar"])
} else {
artifactId = "jvmti-$os-$arch"
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/cmu-pasta/fray")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}
}
}
}
}