forked from maricn/logback-slack-appender
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
100 lines (82 loc) · 2.26 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
plugins {
id 'to.wetransform.semantic-release-version' version '2.1.2' apply false
}
def srcProjects() {
subprojects.findAll { new File(it.projectDir, "src").exists() }
}
def javaProjects() {
subprojects.findAll { new File(it.projectDir, "src/main/java").exists() }
}
def groovyProjects() {
subprojects.findAll { new File(it.projectDir, "src/main/groovy").exists() }
}
allprojects {
group = 'to.wetransform.logging'
apply plugin: 'to.wetransform.semantic-release-version'
}
configure(srcProjects()) {
// common settings
apply plugin: 'java-library'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
}
ext {
logbackVersion = '1.5.13'
slf4jVersion = '2.0.16'
jacksonVersion = '2.17.3'
}
}
configure(javaProjects()) {
// package javadoc into a jar file
task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
archiveClassifier = 'javadoc'
}
}
configure(groovyProjects()) {
// common settings for Groovy projects
apply plugin: 'groovy'
// package groovydoc into a jar file
task packageJavadoc(type: Jar, dependsOn: 'groovydoc') {
from groovydoc.destinationDir
archiveClassifier = 'javadoc'
}
}
configure(srcProjects()) { project ->
// further common configuration (needs java/groovy config)
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
// package source into a jar file
task packageSources(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = 'sources'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact packageSources
artifact packageJavadoc
}
}
repositories {
maven {
url = project.version.endsWith('-SNAPSHOT') ?
'https://artifactory.wetransform.to/artifactory/private-snapshot-local' :
'https://artifactory.wetransform.to/artifactory/private-release-local'
credentials {
username project.hasProperty('wetfArtifactoryUser') ? wetfArtifactoryUser : ''
password project.hasProperty('wetfArtifactoryPassword') ? wetfArtifactoryPassword : ''
}
}
}
}
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '8.11.1'
}