-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
113 lines (97 loc) · 2.92 KB
/
build.gradle
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
plugins {
id 'java' apply true
id 'idea' apply true
id 'java-library' apply true
id 'maven-publish' apply true
id 'org.jetbrains.dokka' version '1.9.20' apply true
id 'org.jetbrains.kotlin.jvm' version '2.0.21' apply true
}
def buildUser = System.properties['user.name']
def buildJava = System.properties['java.vm.version']
def buildVendor = System.properties['java.vm.vendor']
configurations {
embed
implementation.extendsFrom(embed)
}
java {
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.VERSION_21
}
compileJava.options.encoding = 'UTF-8'
group = project.prod_group
version = project.prod_version
base {
archivesName = project.prod_name
}
repositories {
mavenCentral()
maven { url 'https://plugins.gradle.org/m2' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://jitpack.io' }
}
idea {
module {
inheritOutputDirs = true
}
}
dependencies {
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0'
testImplementation 'org.jetbrains.kotlin:kotlin-test:2.0.21'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
embed 'org.jetbrains.kotlin:kotlin-stdlib:2.0.21'
embed fileTree('libs')
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations.embed.each { dep ->
exclude 'LICENSE.txt'
from(project.zipTree(dep)) {
exclude 'META-INF', 'META-INF/**'
}
}
manifest.attributes(
'Built-By': buildUser,
'Created-By': "${buildJava} (${buildVendor})",
'Implementation-Title': project.prod_name,
'Implementation-Version': project.prod_version,
'Implementation-Vendor': project.prod_website
)
}
sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
main.java.srcDirs += 'src/main/java'
}
test {
useJUnitPlatform()
}
publishing {
repositories {
maven {
url = 'repo/'
}
}
publications {
create('mavenJava', MavenPublication) {
artifactId = project.prod_name
from(components.kotlin)
pom {
name = 'concurrentia'
description = 'Simple and open-source multithreading utility.'
url = 'https://github.com/Altiran/concurrentia'
licenses {
license {
name = 'GNU General Public License v3.0'
url = 'https://www.gnu.org/licenses/gpl-3.0.html'
}
}
developers {
developer {
id = 'altiran'
name = 'Altiran Studios'
email = '[email protected]'
}
}
}
}
}
}