我有一个gradle-clojure和javafxports插件的build.gradle文件。它可以编译,但是我确实有一个问题:
已编译的Clojure类文件放在build/clojure/main
下。由于javafxports不知道,因此我最终得到了一个APK文件,其中包含除实际项目类文件之外的所有内容。
如何在打包时告诉Gradle / JavaFXPorts包含这些文件?
这是我当前的build.gradle:
buildscript {
repositories {
jcenter()
google()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.15'
}
}
plugins {
id 'gradle-clojure.clojure' version '0.4.0'
id 'application'
id 'com.github.johnrengelman.shadow' version '2.0.4'
id 'maven-publish'
}
repositories {
mavenCentral()
maven {
name = 'clojars'
url = 'https://repo.clojars.org'
}
}
dependencies {
compile 'org.clojure:clojure:1.9.0'
compile 'clojurefx:clojurefx:0.5.0-SNAPSHOT'
testImplementation 'junit:junit:4.12'
devImplementation 'org.clojure:tools.namespace:0.3.0-alpha4'
}
apply plugin: 'org.javafxports.jfxmobile'
group = 'lyrion'
version = '0.1.0-SNAPSHOT'
mainClassName = 'lyrion.cec'
clojure {
builds {
main {
aotAll()
}
}
}
jfxmobile {
javafxportsVersion = '8.60.9'
downConfig {
version = '3.8.5'
plugins 'cache', 'device', 'lifecycle', 'orientation', 'settings', 'storage'
}
android {
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'project.clj'
}
applicationPackage = 'lyrion'
}
}
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
repositories {
maven {
name = 'clojars'
url = 'https://repo.clojars.org'
credentials {
username = System.env['CLOJARS_USER']
password = System.env['CLOJARS_PASSWORD']
}
}
}
}