0

Consider the build.gradle below:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b9'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
}

mainClassName = 'com.rameses.Main'

jfxmobile {
    android {
        manifest = 'src/android/AndroidManifest.xml'
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
    }
}

And I want to add a new dependency

 dependencies {
     compile files('libs/custom.jar')
 }

QUESTION : How to merge two dependencies together? I tried something like the code below but it didn't worked, it throws an error. Any Idea?

dependencies {
    classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b9',
    compile files('libs/custom.jar')
}
4

1 回答 1

1

Add a separate dependencies block to the build gradle like this -

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b9'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
}

mainClassName = 'com.rameses.Main'

jfxmobile {
    android {
        manifest = 'src/android/AndroidManifest.xml'
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
    }
}
dependencies {
compile files('libs/custom.jar')
//other dependencies - go here
}
于 2015-07-16T08:23:22.113 回答