android - 将单独编译的类文件添加到 JavaFXPorts apk
问题描述
我有一个带有 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']
}
}
}
}
解决方案
推荐阅读
- scipy - 区分 scipy.interpolate.interp1d
- ruby-on-rails - reset_counters 不适用于非关联字段
- phpstorm - 删除旧的 .PhpStorm 目录是否安全
- c# - C# 中的 ZModem 实现 - 由 ZPOS 引起的较大文件的问题
- sql - 位数据类型匹配任何数字字符串
- angular - Angular:从 Karma 移动到 Jest 后,出现错误“无法识别的 CLI 参数”
- vba - 如何删除单词表某些单元格内的换行符
- javascript - 如何生成测试广告以检查 div 宽度是否足以容纳广告?
- mysql - 我的连接表中的某些结果为 NULL,为什么会这样?
- android - 从硬件条形码扫描仪读取值