我使用了filteringCharset = 'UTF-8'
,因爲ProcessResources
中的編碼問題在build.gradle
中。這個構建在我的桌面上成功,但在Travis CI上失敗。我想這是Travis CI的Gradle問題。所以我試圖更新版本,但找不到任何信息。這是Gradle版本的問題嗎?如果是,我該怎麼辦?Travis CI上的Gradle編譯失敗
特拉維斯建立自己的錯誤:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/travis/build/EntryPointKR/K-Security/build.gradle' line: 43
* What went wrong:
A problem occurred evaluating root project 'K-Security'.
> No such property: filteringCharset for class: org.gradle.language.jvm.tasks.ProcessResources_Decorated
完全特拉維斯生成日誌:https://travis-ci.org/EntryPointKR/K-Security/builds/201771722
.travis.yml:在的build.gradle
language: java
sudo: false
jdk:
- oraclejdk8
addons:
apt:
packages:
- oracle-java8-installer
問題代碼
processResources {
filteringCharset = 'UTF-8' // Here
filter ReplaceTokens, tokens: [
"version" : project.version,
"pluginName": rootProject.name,
"mainClass" : "cloud.swiftnode.ksecurity.KSecurity",
"author" : "EntryPoint"
]
}
感謝您的回答 – Pneumono