添加对 build.gradle 的依赖
Adding dependency to build.gradle
考虑下面的 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')
}
像这样向构建 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
}
考虑下面的 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')
}
像这样向构建 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
}