/
build.gradle
83 lines (70 loc) · 1.78 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3'
}
}
plugins {
id "java"
id "maven"
id "maven-publish"
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'com.google.code.gson:gson:2.8.2'
compile 'com.utocat:catalizr-lib-java:0.0.1'
testCompile 'org.testng:testng:6.14.2'
testCompile 'org.slf4j:slf4j-simple:1.7.25'
}
test {
useTestNG {
suites 'src/test/resources/testng.xml'
}
systemProperty "https.protocols", "TLSv1.2,TLSv1.1,TLSv1"
testLogging {
events "failed"
exceptionFormat "full"
showStackTraces true
}
}
apply from: 'gradle/publish.gradle'
group = 'com.utocat'
version = '0.0.4'
sourceCompatibility = '1.6'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
}
}
}
tasks.withType(Javadoc) {
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
task updatePropertiesFile {
doLast {
logger.quiet('Update Catalizr Properties File')
def propertyFile = file "src/main/resources/com/utocat/catalizr/core/catalizr.properties"
def props = new Properties()
propertyFile.withReader { props.load(it) }
props.setProperty("version", (String) version)
propertyFile.withWriter { props.store(it, null) }
}
}
processResources.dependsOn updatePropertiesFile