-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
76 lines (62 loc) · 1.35 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
apply plugin: 'java'
apply plugin: 'maven'
group='com.codeborne'
archivesBaseName = 'geoip'
version='1.4'
compileJava.options.debugOptions.debugLevel = "source,lines,vars"
sourceCompatibility = 1.8
targetCompatibility = 1.8
defaultTasks 'test', 'install'
sourceSets {
main {
java {srcDir 'src'}
resources {srcDir 'resources'}
}
test {
java {srcDir 'test'}
resources {srcDir 'test'}
}
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.13.1'
}
task libs(type: Sync) {
from configurations.compile
from configurations.runtime
from configurations.testCompile
from configurations.testRuntime
into "$buildDir/lib"
}
compileJava.dependsOn libs
test {
include 'com/codeborne/geoip/**/*'
systemProperties['file.encoding'] = 'UTF-8'
testLogging.showStandardStreams = true
}
jar {
manifest {
attributes(
"Implementation-Title": project.group + '.' + project.name,
"Implementation-Version": archiveVersion,
"Implementation-Vendor": "Codeborne")
}
}
task sourcesJar(type: Jar, dependsOn:classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
failOnError=false
}
task javadocJar(type: Jar, dependsOn:javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}