考虑下面的build.gradle:
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')
}
问题:如何将两个依赖项合并在一起?我尝试过类似下面的代码,但它没有用,它会抛出一个错误。有什么想法吗?
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b9',
compile files('libs/custom.jar')
}
答案 0 :(得分:1)
将单独的依赖项块添加到构建gradle中,如下所示 -
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
}