forked from kimble/junit-test-factory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
113 lines (88 loc) · 2.85 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
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
group = 'com.github.kimble'
version = '4.12.3'
repositories {
jcenter()
}
dependencies {
compile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.4.0'
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
options.compilerArgs = [
"-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
"-Xlint:fallthrough", "-Xlint:rawtypes",
"-Xlint:unchecked", "-Xlint:-options", "-Werror"
]
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
options.compilerArgs = [
"-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
"-Xlint:-fallthrough", "-Xlint:-rawtypes", "-Xlint:-deprecation",
"-Xlint:-unchecked", "-Xlint:-options"
]
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
}
if (System.getenv("BINTRAY_USER") && System.getenv("BINTRAY_KEY")) {
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_KEY")
configurations = ['archives']
publications = [ 'mavenJava' ]
pkg { //package will be created if does not exist
repo = 'maven'
name = 'junit-test-factory'
desc = 'Dynamic generation of junit tests'
websiteUrl = 'https://github.com/kimble/junit-test-factory'
issueTrackerUrl = 'https://github.com/kimble/junit-test-factory/issues'
vcsUrl = 'https://github.com/kimble/junit-test-factory.git'
githubRepo = 'kimble/junit-test-factory'
githubReleaseNotesFile = 'README.md'
licenses = ['Apache-2.0']
labels = ['java', 'xml', 'library']
publicDownloadNumbers = true
}
}
}
else {
logger.debug("Set bintrayUser and bintrayKey in ~/.gradle/gradle.properties to enable bintray upload")
}