Skip to content

Commit 2445be7

Browse files
author
James Carnegie
committed
Tests now pass - wow setting them up is hard
1 parent 5461af4 commit 2445be7

8 files changed

Lines changed: 37 additions & 3 deletions

File tree

Flickr4Java/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
.gradle
22
build/
3+
out/
4+
src/examples/resources/setup.properties
5+
src/test/resources/setup.properties
6+
Flickr4Java.iml
7+
Flickr4Java.ipr
8+
Flickr4Java.iws

Flickr4Java/build.gradle

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,44 @@ apply plugin: 'maven'
66
version = '2.1-SNAPSHOT'
77
group = 'com.flicr4java.flickr'
88

9-
sourceCompatibility = '1.5'
10-
9+
//sourceCompatibility = '1.5'
10+
//targetCompatibility = '1.5'
1111

1212
repositories {
1313
mavenCentral()
1414
}
1515

16+
// add examples in the same way as "main" and "test"
17+
sourceSets {
18+
examples {
19+
java {
20+
srcDir 'src/examples/java'
21+
}
22+
resources {
23+
srcDir 'src/examples/resources'
24+
}
25+
//add app classes to examples classpath
26+
compileClasspath = compileClasspath + files(sourceSets.main.output.classesDir)
27+
}
28+
}
29+
30+
//make sure app is compiled before we try to compile examples
31+
compileExamplesJava.dependsOn compileJava
32+
33+
//inherit dependencies from the main app configurations
34+
configurations {
35+
examplesCompile {
36+
extendsFrom compile
37+
}
38+
examplesRuntime {
39+
extendsFrom runtime
40+
}
41+
}
1642
dependencies {
1743
compile 'org.scribe:scribe:1.3.3'
1844
compile 'axis:axis:1.4'
1945
compile 'log4j:log4j:1.2.17'
20-
testCompile group: 'junit', name: 'junit', version: '4.+'
46+
testCompile group: 'junit', name: 'junit', version: '4.11'
2147
}
48+
49+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)