forked from copper-engine/copper-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
127 lines (109 loc) · 4.06 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
127 lines (109 loc) · 4.06 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
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
plugins {
id("com.github.ben-manes.versions") version "0.51.0"
id("com.github.hierynomus.license-base") version "0.16.1"
`maven-publish`
`java-library`
signing
}
subprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "signing")
group = "org.copper-engine"
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.register<Jar>("createSourcesJar") {
dependsOn(tasks.classes)
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
tasks.register<Jar>("createJavadocJar") {
dependsOn(tasks.javadoc)
archiveClassifier.set("javadoc")
from(tasks.javadoc.get().destinationDir)
}
artifacts {
archives(tasks.named("createSourcesJar"))
archives(tasks.named("createJavadocJar"))
}
apply(plugin = "com.github.hierynomus.license")
license {
header = file("$rootDir/common/apache-license-file.txt")
setSkipExistingHeaders(true)
setIgnoreFailures(true)
}
apply(plugin = "signing")
publishing {
publications {
signing.sign(
create<MavenPublication>("library") {
from(components["java"])
pom {
name.set("COPPER high-performance workflow engine")
groupId = "io.github.keymaster65"
packaging = "jar"
description.set("COPPER is an open-source, powerful, light-weight, and easily configurable workflow engine. The power of COPPER is that it uses Java as a description language for workflows.")
url.set("http://copper-engine.org/")
scm {
url.set("https://github.com/copper-engine/copper-engine")
connection.set("scm:git@github.com:copper-engine/copper-engine.git")
}
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
developers {
developer {
id.set("copper-team")
name.set("Copper Engine Development Team")
}
}
}
}
)
}
}
publishing {
repositories {
maven {
credentials {
username = project.findProperty("SONA_TOKEN_USERNAME")?.toString() ?: ""
password = project.findProperty("SONA_TOKEN_PASSWORD")?.toString() ?: ""
}
url = uri(
if (version.toString().endsWith("-SNAPSHOT")) {
"https://oss.sonatype.org/content/repositories/snapshots/"
} else {
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
)
}
}
}
dependencies {
implementation("com.github.javaparser:javaparser-symbol-solver-core:3.6.23") {
exclude(module = "javaparser-symbol-solver-model")
}
implementation("org.slf4j:slf4j-api:2.0.13")
testImplementation("junit:junit:4.13.2") {
exclude(module = "hamcrest-core")
}
testImplementation("org.mockito:mockito-core:5.11.0")
testImplementation("net.bytebuddy:byte-buddy:1.14.13")
testImplementation("org.hamcrest:hamcrest-core:2.2")
testImplementation("ch.qos.logback:logback-classic:1.5.6")
}
tasks.jar {
manifest {
attributes["provider"] = "gradle"
}
}
}