Sau khi nâng cấp lên Gradle 4.x, tôi get the warningThuộc tính CompileOptions.bootClasspath đã bị phản đối
Thuộc tính CompileOptions.bootClasspath đã bị phản đối và dự kiến sẽ được loại bỏ trong Gradle 5.0. Vui lòng sử dụng thuộc tính CompileOptions.bootstrapClasspath thay thế.
trong một trong các dự án của tôi. Tôi không thấy bất kỳ thứ gì được gọi là bootClasspath
hoặc tương tự trong số build.gradle của mình. Cảnh báo này có ý nghĩa gì?
cảnh báo chỉ xuất hiện trong commons tiểu dự án, không phải trong lõi.
commons/build.gradle:
apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'com.afollestad.material-dialogs'
PUBLISH_ARTIFACT_ID = 'commons'
PUBLISH_VERSION = '0.9.2.3'
BUILD_TOOLS = "26.0.3"
TARGET_SDK = 25
}
android {
compileSdkVersion TARGET_SDK
buildToolsVersion BUILD_TOOLS
defaultConfig {
minSdkVersion 16
targetSdkVersion TARGET_SDK
versionCode 1
versionName PUBLISH_VERSION
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
implementation project(':core')
}
// Changes to this block must be applied in core/build.gradle and commons/build.gradle
task("javadoc", type: Javadoc) {
description "Generates Javadoc API documentation for the main source code."
source = android.sourceSets.main.java.srcDirs
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
classpath += files(ext.androidJar)
exclude "**/BuildConfig.java"
exclude "**/R.java"
options.links("http://docs.oracle.com/javase/7/docs/api/");
options.links("http://d.android.com/reference/");
}
lõi/build.gradle:
apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'com.afollestad.material-dialogs'
PUBLISH_ARTIFACT_ID = 'core'
PUBLISH_VERSION = '0.9.2.3'
SUPPORT_LIBRARY_VERSION = '25.4.0'
BUILD_TOOLS = "26.0.3"
TARGET_SDK = 25
}
android {
compileSdkVersion TARGET_SDK
buildToolsVersion BUILD_TOOLS
defaultConfig {
minSdkVersion 16
targetSdkVersion TARGET_SDK
versionCode 1
versionName PUBLISH_VERSION
consumerProguardFiles 'progress-proguard.txt'
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
api "com.android.support:support-v13:$SUPPORT_LIBRARY_VERSION"
api "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
api "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION"
api "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION"
implementation "me.zhanghai.android.materialprogressbar:library:1.4.1"
}
// Changes to this block must be applied in core/build.gradle and commons/build.gradle
task("javadoc", type: Javadoc) {
description "Generates Javadoc API documentation for the main source code."
source = android.sourceSets.main.java.srcDirs
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
classpath += files(ext.androidJar)
exclude "**/BuildConfig.java"
exclude "**/R.java"
options.links("http://docs.oracle.com/javase/7/docs/api/");
options.links("http://d.android.com/reference/");
}
Cảm ơn bạn đã chỉ cho tôi đúng hướng. Tôi đã viết một câu trả lời chi tiết hơn dựa trên các đề xuất của bạn mà bỏ ra bất kỳ giải pháp JDK 9, mà không phải là phù hợp trong môi trường của tôi. –