-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
130 lines (109 loc) · 2.81 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
plugins {
id("dev.clojurephant.clojure")
id("java-library")
id("maven-publish")
id("com.diffplug.spotless")
}
group = "dev.clojurephant"
java {
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
sourceSets {
val sample by creating {}
val test by existing {
runtimeClasspath = runtimeClasspath.plus(sample.getOutput())
}
}
clojure {
builds {
val main by existing {
reflection.set("fail")
}
val sample by existing {
aotNamespaces.add("sample.other-test")
}
}
}
dependencies {
api("org.junit.platform:junit-platform-engine:latest.release")
api("org.clojure:clojure:1.11.1")
api("org.clojure:tools.namespace:latest.release")
testImplementation("junit:junit:latest.release")
testImplementation("org.junit.platform:junit-platform-launcher:latest.release")
"sampleImplementation"("org.clojure:clojure:1.11.1")
}
tasks.named<Jar>("jar") {
manifest {
attributes(mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Automatic-Module-Name" to "org.ajoberstar.jovial"))
}
}
tasks.named<Test>("test") {
classpath = classpath.plus(files("src/sample/clojure"))
systemProperty("classpath.roots", file("src/sample/clojure"))
}
spotless {
java {
importOrder("java", "javax", "")
eclipse().configFile(project.rootProject.file("gradle/eclipse-java-formatter.xml"))
}
}
dependencyLocking {
lockAllConfigurations()
}
publishing {
repositories {
maven {
name = "Clojars"
url = uri("https://repo.clojars.org/")
credentials {
username = System.getenv("CLOJARS_USER")
password = System.getenv("CLOJARS_TOKEN")
}
}
}
publications {
create<MavenPublication>("main") {
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set(project.name)
description.set(project.description)
url.set("https://github.com/clojurephant/jovial")
developers {
developer {
name.set("Andrew Oberstar")
email.set("[email protected]")
}
}
licenses {
license {
name.set("MIT License")
url.set("https://github.com/clojurephant/jovial/blob/main/LICENSE")
}
}
scm {
url.set("https://github.com/clojurephant/jovial")
connection.set("scm:git:[email protected]:clojurephant/jovial.git")
developerConnection.set("scm:git:[email protected]:clojurephant/jovial.git")
}
}
}
}
}
// Clojars doesn't support module metadata yet
tasks.withType<GenerateModuleMetadata>() {
enabled = false
}