Skip to content

Commit

Permalink
housework. Upgrading to Gradle 2.6. remove import warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Dierk Koenig committed Aug 24, 2015
1 parent ecbb3bc commit 46ff61e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 81 deletions.
19 changes: 0 additions & 19 deletions allJavaFX.groovy

This file was deleted.

58 changes: 0 additions & 58 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ buildscript { // make the frege plugin available in our build
}
}


apply plugin: 'java'
apply plugin: 'frege'
apply plugin: "application"
Expand Down Expand Up @@ -42,61 +41,4 @@ dependencies {
compile "org.frege-lang:frege-repl-core:1.2.1-SNAPSHOT" // , { exclude module:"frege" }
}




project.tasks.compileFrege.dependsOn(project.tasks.compileJava) // make java compile first

ext {
jfxLibDir = locateJfxLibDir()
}

//sourceSets {
// main {
// java {
// compileClasspath += project.files("build/classes/main")
// }
// }
//}

dependencies {
compile files("$jfxLibDir/jfxrt.jar") // TODO: find out why this seems to be necessary even on JDK 8
}

// this should probably go into FregeFX or the Gradle plugin
String locateJfxLibDir() {
def javaFxHome = System.env['JAVAFX_HOME'] ?: ''
def javaHome = System.env['JAVA_HOME'] ?: ''
def jdk8 = System.getProperty('java.version')[0..2].toDouble() == 1.8

if (! jdk8) {
throw new GradleScriptException("Please use Java 8.", null)
}

def jdkHome = System.properties.'java.home' ?: ''

def result = "$javaFxHome/rt/lib"
if (new File("$result/jfxrt.jar").exists()) {
logger.info "using javafx from explicit JAVAFX_HOME: $result"
return result
}
result = "$jdkHome/lib/ext/"
if (jdk8 && new File("$result/jfxrt.jar").exists()) {
logger.info "using javafx from current java 8: $result"
return result
}
result = "$javaHome/jre/lib/"
if (new File("$result/jfxrt.jar").exists()) {
logger.info "using javafx from explicit JAVA_HOME: $result"
return result
}
result = "$javaHome/lib/"
if (new File("$result/jfxrt.jar").exists()) {
logger.info "using javafx from explicit JAVA_HOME: $result"
return result
}
logger.error "please use a Java Version 8"
logger.error " or set JAVA_HOME to a dir that contains the jre/lib/jfxrt.jar"
logger.error " or set JAVAFX_HOME to a dir that contains the rt/lib/jfxrt.jar"
throw new GradleScriptException("location of jfxrt.jar could not be determined", null)
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Feb 21 19:40:12 CET 2015
#Mon Aug 24 18:41:30 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
2 changes: 0 additions & 2 deletions src/main/frege/org/frege/Application.fr
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ monolog title content =
stage.setScene scene
stage.show

withUI f = Platform.runLater =<< Runnable.new f

data GraphicRepl = GraphicRepl {input :: (MVar String), inputArea :: IO (MVar TextArea), outputArea :: IO (MVar TextArea)}

instance ReplIO GraphicRepl where
Expand Down

0 comments on commit 46ff61e

Please sign in to comment.