-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
62 lines (52 loc) · 2.13 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
62 lines (52 loc) · 2.13 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
import xyz.srnyx.gradlegalaxy.data.config.DependencyConfig
import xyz.srnyx.gradlegalaxy.data.config.JavaSetupConfig
import xyz.srnyx.gradlegalaxy.data.config.publishing.publishingSimpleConfig
import xyz.srnyx.gradlegalaxy.data.pom.DeveloperData
import xyz.srnyx.gradlegalaxy.data.pom.LicenseData
import xyz.srnyx.gradlegalaxy.enums.Repository
import xyz.srnyx.gradlegalaxy.enums.repository
import xyz.srnyx.gradlegalaxy.utility.setupJava
import xyz.srnyx.gradlegalaxy.utility.setupPublishingEnv
import xyz.srnyx.gradlegalaxy.utility.setupTesting
plugins {
base
id("xyz.srnyx.gradle-galaxy") version "8d36906" apply false
}
subprojects {
apply(plugin = "java-library")
apply(plugin = "xyz.srnyx.gradle-galaxy")
setupJava(config = JavaSetupConfig(
group = "gg.eventalerts",
javaVersion = JavaVersion.VERSION_1_8))
repository(Repository.SRNYX_RELEASES, Repository.SRNYX_SNAPSHOTS, Repository.MAVEN_CENTRAL)
dependencies {
val annotations = "org.jetbrains:annotations:26.1.0"
add("compileOnly", annotations)
add("testCompileOnly", annotations)
}
// Setup testing
setupTesting(junitBomConfig = DependencyConfig(version = "5.14.4"))
// Setup publishing
setupPublishingEnv(publishingSimpleConfig(
groupId = "gg.eventalerts.sdk",
artifactId = name,
url = "https://eventalerts.gg/api/sdk",
licenses = listOf(LicenseData.GPL_V3),
developers = listOf(DeveloperData.srnyx)))
}
// Copy subproject JARs to root build/libs
val copyJarsTask = tasks.register<Copy>("copyJars") {
description = "Copies subproject JARs to the root build/libs directory"
from(subprojects.map { subproject ->
listOf(
subproject.tasks.named("jar"),
subproject.tasks.named("sourcesJar"),
subproject.tasks.named("javadocJar"),
)
})
into(layout.buildDirectory.dir("libs"))
}
tasks.named("build") { dependsOn(copyJarsTask) }
// Run all subproject checks
tasks.named("check") { dependsOn(subprojects.map { it.tasks.named("check") }) }
tasks.named("assemble") { dependsOn(subprojects.map { it.tasks.named("assemble") }) }