Skip to content

Commit b7e6d52

Browse files
committed
FJ works with Gradle 1.8, Scala 2.9 and Java 7
1 parent 0ff8cfb commit b7e6d52

File tree

5 files changed

+101
-4
lines changed

5 files changed

+101
-4
lines changed

core/build.gradle

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* This build file was auto generated by running the Gradle 'buildSetup' task
3+
* by 'MarkPerry' at '19/11/13 10:51 AM' with Gradle 1.8
4+
*
5+
* This generated file contains a sample Java project to get you started.
6+
* For more details take a look at the Java Quickstart chapter in the Gradle
7+
* user guide available at http://gradle.org/docs/1.8/userguide/tutorial_java_projects.html
8+
*/
9+
10+
// Apply the java plugin to add support for Java
11+
apply plugin: 'java'
12+
apply plugin: 'scala'
13+
14+
defaultTasks 'build'
15+
16+
ext {
17+
// scalaVersion = "2.7.+"
18+
// scalaVersion = "2.8.+"
19+
scalaVersion = "2.9.+"
20+
21+
scalacheckVersion = "1.10.+"
22+
}
23+
24+
25+
26+
// In this section you declare where to find the dependencies of your project
27+
repositories {
28+
// Use 'maven central' for resolving your dependencies.
29+
// You can declare any Maven/Ivy/file repository here.
30+
mavenCentral()
31+
}
32+
33+
// In this section you declare the dependencies for your production and test code
34+
dependencies {
35+
// The production code uses the SLF4J logging API at compile time
36+
compile 'org.slf4j:slf4j-api:1.7.5'
37+
testCompile "org.scala-lang:scala-library:$scalaVersion"
38+
testCompile "org.scalacheck:scalacheck_2.9.3:$scalacheckVersion"
39+
40+
41+
// Declare the dependency for your favourite test framework you want to use in your tests.
42+
// TestNG is also supported by the Gradle Test task. Just change the
43+
// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
44+
// 'test.useTestNG()' to your build script.
45+
testCompile "junit:junit:4.11"
46+
}

core/src/test/scala/fj/JavaTest.java renamed to core/src/test/scala/fj/FunctionalJavaJUnitTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
* Time: 12:06 PM
1111
* To change this template use File | Settings | File Templates.
1212
*/
13-
public class JavaTest {
13+
public class FunctionalJavaJUnitTest {
1414

1515
@Test
16-
public void test1() {
17-
System.out.println("Hello world");
16+
public void runScalacheckTests() {
17+
// System.out.println("Hello world");
1818
Assert.assertTrue(true);
19+
// new Tests$().main(null);
20+
Tests.main(null);
1921
}
2022

2123
}

core/src/test/scala/fj/Tests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ object Tests {
1919

2020
def main(args: Array[String]) {
2121
run(tests)
22-
System.exit(0)
22+
// System.exit(0)
2323
}
2424

2525
import org.scalacheck.Prop

demo/build.gradle

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* This build file was auto generated by running the Gradle 'buildSetup' task
3+
* by 'MarkPerry' at '19/11/13 10:51 AM' with Gradle 1.8
4+
*
5+
* This generated file contains a sample Java project to get you started.
6+
* For more details take a look at the Java Quickstart chapter in the Gradle
7+
* user guide available at http://gradle.org/docs/1.8/userguide/tutorial_java_projects.html
8+
*/
9+
10+
// Apply the java plugin to add support for Java
11+
apply plugin: 'java'
12+
//apply plugin: 'scala'
13+
14+
defaultTasks 'build'
15+
16+
ext {
17+
// scalaVersion = "2.7.+"
18+
// scalaVersion = "2.8.+"
19+
scalaVersion = "2.9.+"
20+
21+
scalacheckVersion = "1.10.+"
22+
}
23+
24+
25+
26+
// In this section you declare where to find the dependencies of your project
27+
repositories {
28+
// Use 'maven central' for resolving your dependencies.
29+
// You can declare any Maven/Ivy/file repository here.
30+
mavenCentral()
31+
}
32+
33+
// In this section you declare the dependencies for your production and test code
34+
dependencies {
35+
// The production code uses the SLF4J logging API at compile time
36+
compile 'org.slf4j:slf4j-api:1.7.5'
37+
compile project(":core")
38+
// testCompile "org.scala-lang:scala-library:$scalaVersion"
39+
// testCompile "org.scalacheck:scalacheck_2.9.3:$scalacheckVersion"
40+
41+
42+
// Declare the dependency for your favourite test framework you want to use in your tests.
43+
// TestNG is also supported by the Gradle Test task. Just change the
44+
// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
45+
// 'test.useTestNG()' to your build script.
46+
testCompile "junit:junit:4.11"
47+
}

settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
include 'core', 'demo'

0 commit comments

Comments
 (0)