-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
108 lines (88 loc) · 2.66 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
plugins {
id 'ru.vyarus.github-info' version '2.0.0' apply false
id 'ru.vyarus.quality' version '5.0.0' apply false
id 'base'
id 'jacoco'
id 'ru.vyarus.java-lib' version '3.0.0'
id 'net.researchgate.release' version '3.1.0'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'com.github.ben-manes.versions' version '0.52.0'
}
wrapper {
gradleVersion = '8.10'
}
javaLib {
// aggregated test and coverage reports
aggregateReports()
}
allprojects {
repositories { mavenLocal(); mavenCentral() }
group = 'ru.vyarus'
}
subprojects {
apply plugin: 'groovy'
apply plugin: 'jacoco'
apply plugin: 'project-report'
apply plugin: 'signing'
apply plugin: 'ru.vyarus.java-lib'
apply plugin: 'ru.vyarus.quality'
apply plugin: 'ru.vyarus.github-info'
apply plugin: 'com.github.ben-manes.versions'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
testImplementation 'org.spockframework:spock-core:2.4-M4-groovy-4.0'
}
github {
user = 'xvik'
license = 'MIT'
}
maven.pom {
developers {
developer {
id = 'xvik'
name = 'Vyacheslav Rusakov'
email = '[email protected]'
}
}
}
javaLib {
// java 9 auto module name
autoModuleName = "$group.${project.name.replace('-', '.')}"
// don't publish gradle metadata artifact
withoutGradleMetadata()
}
test {
useJUnitPlatform()
testLogging {
events 'skipped', 'failed'
exceptionFormat 'full'
}
maxHeapSize = '512m'
}
dependencyUpdates.revision = 'release'
}
// dependency on all subprojects required for release validation
check.dependsOn subprojects.check
nexusPublishing {
repositories {
sonatype {
username = findProperty('sonatypeUser')
password = findProperty('sonatypePassword')
}
}
}
// skip signing for jitpack (snapshots)
tasks.withType(Sign) {onlyIf { !System.getenv('JITPACK') }}
// Required signing properties for release: signing.keyId, signing.password and signing.secretKeyRingFile
// (https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials)
release.git.requireBranch.set('master')
// release manages only root project (subprojects will be checked and released implicitly)
afterReleaseBuild {
dependsOn subprojects.collect {":$it.name:publishToSonatype" }
dependsOn 'closeAndReleaseSonatypeStagingRepository'
doLast {
logger.warn "RELEASED $project.group:$project.name:$project.version"
}
}