-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
79 lines (62 loc) · 1.97 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
plugins {
id "java"
id "idea"
}
version = '0.7'
ext.majorversion = '0'
ext.minorversion = '7'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
repositories {
jcenter()
mavenCentral()
}
sourceSets {
main {
java {
srcDirs 'src'
}
}
}
dependencies {
//compile group: 'se.jiderhamn.classloader-leak-prevention', name: 'classloader-leak-prevention-core', version: '2.6.1'
//compile group: 'se.jiderhamn', name: 'classloader-leak-prevention', version: '1.15.4'
//compile group: 'se.jiderhamn', name: 'classloader-leak-prevention', version: '1.15.4'
compile 'junit:junit:4.12'
testCompile 'junit:junit:4.12'
testCompile group: 'se.jiderhamn.classloader-leak-prevention', name: 'classloader-leak-prevention-core', version: '2.6.1'
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version)
}
baseName 'mljdbc'
}
task copyJar(type: Copy) {
from jar // here it automatically reads jar file produced from jar task
into "$projectDir/jar"
rename {'mljdbc-42.1.4.jar'}
}
build.dependsOn copyJar
import org.apache.tools.ant.filters.ReplaceTokens
task processSources(type: Sync) {
// from 'src/main/java/org/postgresql/util/DriverInfo.java'
from sourceSets.main.java
exclude 'com'
exclude 'org'
inputs.property 'majorversion', majorversion
inputs.property 'minorversion', minorversion
filteringCharset = 'UTF-8'
filter(ReplaceTokens, tokens:
[
'$mvn.project.property.parsedversion.osgiversion$': majorversion+'.'+minorversion,
'$mvn.project.property.parsedversion.majorversion$': majorversion,
'$mvn.project.property.parsedversion.minorversion$': minorversion
])
into "$buildDir/src"
}
compileJava {
source = processSources.outputs
}