Skip to content

Commit c1047e2

Browse files
committed
Merge pull request BruceEckel#3 from BruceEckel/gradleize
Gradleize
2 parents 97e1615 + 12c16bd commit c1047e2

7 files changed

Lines changed: 323 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ io/X.file
7070
/exceptions/Results.txt
7171
/files/Cheese.txt
7272
/files/StreamInAndOut.txt
73+
74+
/.gradle/
75+
/*.iml
76+
/.idea/

Ant-Clean.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<include name="**/test.gz" />
2222
<include name="**/test.zip" />
2323
<include name="**/X.file" />
24+
<exclude name=".idea/"/>
25+
<exclude name="*.iml"/>
2426
<exclude name="**/*.java"/>
2527
<exclude name="**/Copyright.txt" />
2628
<exclude name="**/Face*.gif"/>

build.gradle

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
repositories {
2+
mavenLocal()
3+
mavenCentral()
4+
maven {
5+
url 'http://maven-eclipse.github.io/maven'
6+
}
7+
}
8+
9+
// these java plugin settings don't really need to be specified since ant does the actual build, but it makes things nicer in an IDE that understands gradle projects
10+
apply plugin: 'java'
11+
12+
sourceCompatibility = '1.8'
13+
targetCompatibility = '1.8'
14+
15+
sourceSets {
16+
main {
17+
java {
18+
srcDirs 'annotations', 'arrays', 'assertions', 'com', 'compression', 'concurrency', 'containers', 'containersindepth', 'control', 'debugging', 'enums', 'exceptions', 'files', 'functional', 'generics', 'hiding', 'housekeeping', 'innerclasses', 'interfaces', 'iostreams', 'logging', 'network', 'newio', 'objects', 'onjava', 'operators', 'patterns', 'polymorphism', 'preferences', 'references', 'remote', 'reuse', 'serialization', 'standardio', 'staticchecking', 'streams', 'strings', 'swt', 'typeinfo', 'ui', 'unittesting'
19+
}
20+
}
21+
}
22+
23+
// fix for a xom / xalan transitive dependency issue: http://stackoverflow.com/a/23870656/77409
24+
configurations.all {
25+
resolutionStrategy {
26+
force 'xml-apis:xml-apis:1.0.b2'
27+
}
28+
}
29+
30+
31+
dependencies {
32+
compile 'org.eclipse.swt:org.eclipse.swt.win32.win32.x86:4.4.2'
33+
compile 'org.eclipse.swt:org.eclipse.swt.win32.win32.x86_64:4.4.2'
34+
compile 'org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:4.4.2'
35+
compile 'org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:4.4.2'
36+
compile 'org.eclipse.swt:org.eclipse.swt.cocoa.macosx.x86_64:4.4.2'
37+
compile 'junit:junit:4.12'
38+
compile 'com.io7m.xom:xom:1.2.10'
39+
}
40+
41+
// this sets the classpath that ant uses to include the dependency jars
42+
ant.properties['java.class.path'] = sourceSets.main.compileClasspath.getAsPath()
43+
44+
// import the ant build and override a few task names
45+
ant.importBuild('build.xml') { antTaskName ->
46+
if (antTaskName == 'build') 'ant-build' // rename ant's build task to ant-build so it doesn't override the gradle task with that name
47+
else if (antTaskName == 'clean') 'ant-clean' // rename ant's clean task to ant-clean so it doesn't override the gradle task with that name
48+
else antTaskName
49+
}
50+
51+
// this task is already defined by gradle so we need to tell it to call the ant clean task
52+
clean << {
53+
tasks['ant-clean'].execute()
54+
}
55+
56+
// this task is already defined by gradle so we need to tell it to call the ant build task
57+
build << {
58+
tasks['ant-build'].execute()
59+
}
60+
61+
defaultTasks 'run'

gradle/wrapper/gradle-wrapper.jar

52.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri Dec 11 12:37:50 MST 2015
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip

gradlew

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 90 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)