-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
110 lines (90 loc) · 2.53 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
108
109
110
import java.util.concurrent.TimeUnit
apply plugin: 'java-library'
static String envOr(String key, String presentPrefix = "", Object or = "") {
def env = System.getenv()
if (env.containsKey(key))
return presentPrefix + env.get(key)
return or
}
ext {
buildId = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())
}
task tcBuildId {
doLast {
println "##teamcity[buildNumber '$buildId']"
}
}
tasks.named('jar').configure { dependsOn tcBuildId }
group 'org.comroid'
version '0.1.0' + '.' + buildId
apply from: 'gradle/vars.gradle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.findByName('wrapper')?.configure {
gradleVersion = '6.2'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
configurations {
compileClasspath {
resolutionStrategy.activateDependencyLocking()
}
}
tasks.withType(Javadoc) {
source = sourceSets.main.java
options {
encoding = 'UTF-8'
/*
links = [
"https://docs.oracle.com/javase/8/docs/api/",
"https://docs.oracle.com/javaee/7/api/"
]
*/
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
try {
archiveClassifier.set 'sources'
} catch (MissingPropertyException ignored) {
classifier = "sources"
}
}
task javadocJar(type: Jar) {
from javadoc.destinationDir
try {
archiveClassifier.set 'javadoc'
} catch (MissingPropertyException ignored) {
classifier = "javadoc"
}
}
compileJava.options.encoding = 'UTF-8'
repositories {
mavenLocal()
maven {
url "https://maven.jetbrains.space/comroid/release"
credentials.username "Anonymous.User"
credentials.password "anonymous"
}
maven {
url "https://maven.jetbrains.space/comroid/repo"
credentials.username "Anonymous.User"
credentials.password "anonymous"
}
jcenter()
maven { url 'https://www.jitpack.io' }
}
dependencies {
api 'org.jetbrains:annotations:21.+'
if (isAutoDeploy) {
implementation 'org.comroid:restless:0.+'
} else {
implementation project(':guardian:restless')
}
// logging dependencies
api 'org.apache.logging.log4j:log4j-api:2.17.0'
testImplementation 'org.apache.logging.log4j:log4j-core:2.17.0'
testImplementation 'junit:junit:4.13'
testImplementation 'org.easymock:easymock:4.1'
testImplementation 'org.codehaus.groovy:groovy:3.0.0-rc-2'
}
apply from: 'gradle/publishing.gradle'