forked from netconomy/restflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (85 loc) · 2.45 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
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.13.3'
}
}
allprojects {
apply plugin: 'base'
apply plugin: 'idea'
apply plugin: 'maven-publish'
version = '1.5.0'.with {
def r = project.properties['RELEASE']
if ( r == null) {
return "$it-SNAPSHOT"
} else if (r != it) {
throw new GradleException("RELEASE mismatch: RELEASE='$r', expected '$it'")
} else {
return it
}
}
group = 'net.netconomy.tools.restflow'
repositories {mavenCentral()}
buildDir = 'target'
archivesBaseName = buildArtifactBaseName(project)
idea.module {
name = archivesBaseName
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'groovy'
//noinspection UnnecessaryQualifiedReference
apply plugin: local.LibsPlugin
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
ext.enableMavenPublishing = true
libs {
groovy4 {group 'org.apache.groovy' version '4.0.16'}
groovy3 {group 'org.codehaus.groovy' version '3.0.14'}
groovy(groovy4) {
lib 'groovy'
lib 'groovy-datetime'
lib 'groovy-nio'
lib 'groovy-templates'
lib 'groovy-xml'
lib 'groovy-json'
lib 'groovy-swing' // TODO (2023-02-08) required for password prompt, find better solution
}
//spock {
// def groovyMajor = (~/^(\d+\.\d+)(?:\..*)?/).matcher(groovy.version).with {
// matches()
// group(1)
// }
// group 'org.spockframework' version "2.3-groovy-$groovyMajor"
// lib('core') {
// exclude group: 'org.codehaus.groovy'
// exclude group: 'org.apache.groovy'
// }
//}
}
//noinspection GroovyAssignabilityCheck
task sourceJar(type: Jar, group: 'build') {
archiveClassifier.set 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourceJar
}
ext.additionalPublications = [sourceJar]
}
def buildArtifactBaseName(Project prj) {
if (prj == rootProject) {
return 'restflow'
} else {
return buildArtifactBaseName(prj.parent) + '-' + prj.name
}
}