-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
79 lines (66 loc) · 2.27 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
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "com.netflix.nebula:gradle-extra-configurations-plugin:2.2.2"
classpath group: 'net.sf.jacob-project', name: 'jacob', version: '1.14.3'
}
}
allprojects {
// Not going to be org.codehaus anymore, so choose something useful
group = 'this.will.be.a.new.group'
// Probably want to target later Groovy so let's adjust the version as well
version = '2.4.0-SNAPSHOT'
// group = 'org.codehaus.groovy.modules.scriptom'
// version = '1.6.1-SNAPSHOT'
}
subprojects {
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'nebula.provided-base'
ext {
groovyVer = '1.8.0'
// groovyVer = '[2.4.0,2.4.99]'
jacobVer = '1.14.3'
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
provided group: 'org.codehaus.groovy', name: 'groovy', version: groovyVer
compile group: 'net.sf.jacob-project', name: 'jacob', version: jacobVer
testCompile 'junit:junit:4.11'
// testCompile group: 'org.codehaus.groovy', name: 'groovy', version: groovyVer
compile group: 'net.sf.jacob-project', name: 'jacob', version: jacobVer, classifier:'x64', ext:'dll'
compile group: 'net.sf.jacob-project', name: 'jacob', version: jacobVer, classifier:'x86', ext:'dll'
}
// Probably want to go 1.6 here anyway
// sourceCompatibility = 1.5
// targetCompatibility = 1.5
sourceCompatibility = 1.6
targetCompatibility = 1.6
task packageSources(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts{
archives packageSources
}
sourceSets {
test {
resources {
srcDir "$buildDir/test-resources"
}
}
}
compileTestGroovy.doLast {
File testResources = new File("$buildDir/test-resources")
testResources.mkdirs()
File dll = configurations.compile.find {it.name == "jacob-$jacobVer-${com.jacob.com.LibraryLoader.shouldLoad32Bit()?'x86':'x64'}.dll"}
new File(testResources, '/jacob-dll-path.properties').withWriter {it << 'jacob.dll.path=' + dll.canonicalPath.replace('\\', '/')}
}
}