-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
I’m trying to build a Scala+JavaFX application for Android (the most awesomesterest cross-platform technology stack). I used the Gluon Eclipse plugin to create a “Basic Gluon Application”, then I followed the gradle-android-scala-plugin readme instructions.
When I run the androidInstall build task (from jfxmobile), I get the error "The 'java' plugin has been applied, but it is not compatible with the Android plugins." So apparently jfxmobile runs the java plugin; any ideas on how to make these two play nice?
My build script looks like this:
`
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.7'
classpath "com.android.tools.build:gradle:1.3.1"
classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.4"
}
}
apply plugin: 'org.javafxports.jfxmobile'
//apply plugin: 'scala'
//apply plugin: 'eclipse'
apply plugin: "com.android.application"
apply plugin: "jp.leafytree.android-scala"
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
mainClassName = 'com.percebemusic.test.javafx.MainApplication'
jfxmobile {
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
}
}
// see https://github.com/saturday06/gradle-android-scala-plugin
android {
compileSdkVersion "android-21"
buildToolsVersion "22.0.1"
defaultConfig {
targetSdkVersion 22
testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
versionCode 1
versionName "1.0"
multiDexEnabled true
}
productFlavors {
dev {
minSdkVersion 21 // To reduce compilation time
}
prod {
minSdkVersion 8
}
}
sourceSets {
main {
scala {
srcDir "path/to/main/scala" // default: "src/main/scala"
}
}
androidTest {
scala {
srcDir "path/to/androidTest/scala" // default: "src/androidTest/scala"
}
}
}
}
dependencies{
compile 'org.slf4j:slf4j-api:1.7.5'
compile "org.scala-lang:scala-library:2.11.7"
compile "com.android.support:multidex:1.0.1"
testCompile "junit:junit:4.11"
androidTestCompile "com.android.support:multidex-instrumentation:1.0.1", { exclude module: "multidex" }
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.deprecation = false
scalaCompileOptions.additionalParameters = ["-feature"]
}
`
Metadata
Metadata
Assignees
Labels
No labels