-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
83 lines (76 loc) · 2.66 KB
/
build.gradle
File metadata and controls
83 lines (76 loc) · 2.66 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
plugins {
id 'base'
id 'org.jetbrains.kotlin.jvm' version '2.2.0'
id 'org.jetbrains.kotlin.kapt' version '2.2.0'
id "com.vanniktech.maven.publish" version "0.34.0"
}
allprojects {
group = findProperty('group') as String
if (hasProperty("version")) {
version = findProperty('version') as String
} else {
version = findProperty('baseVersion') as String
}
repositories {
mavenCentral()
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jetbrains.kotlin.kapt'
apply plugin: 'com.vanniktech.maven.publish'
// Configure Vanniktech plugin
mavenPublishing {
publishToMavenCentral(true)
signAllPublications()
coordinates(
rootProject.group as String,
"${rootProject.name}-${project.name}",
rootProject.version as String
)
pom {
name = "${rootProject.name}-${project.name}"
description = "A module of the ${rootProject.name} project."
url = "https://github.com/EventHorizonLab/SPI-Tooling"
licenses {
license {
name = "MIT License"
url = "https://opensource.org/license/mit"
}
}
developers {
developer {
id = "eventhorizonlab"
name = "EventHorizonLab"
url = "https://github.com/EventHorizonLab"
}
}
scm {
url = "https://github.com/EventHorizonLab/SPI-Tooling"
connection = "scm:git:https://github.com/EventHorizonLab/SPI-Tooling.git"
developerConnection = "scm:git:ssh://git@github.com:EventHorizonLab/SPI-Tooling.git"
}
}
}
// Add GitHub Packages as an extra target
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/EventHorizonLab/SPI-Tooling")
credentials {
username = findProperty('gprUser') ?: System.getenv('GITHUB_ACTOR')
password = findProperty('gprToken') ?: System.getenv('GITHUB_TOKEN')
}
}
}
}
}
tasks.register('copyJar', Copy) {
description = 'Collects all subproject jars into the root build/ directory'
group = 'build'
dependsOn subprojects.collect { it.tasks.matching { it.name == 'jar' } }
from subprojects.collect { proj -> proj.tasks.named('jar').flatMap { it.archiveFile } }
into layout.buildDirectory.dir('libs')
}