mirror of
https://github.com/apache/cordova-android.git
synced 2026-01-30 00:05:28 +08:00
feat: AndroidShowDeprecations preference flag (#1822)
This commit is contained in:
@@ -113,7 +113,8 @@ function getUserGradleConfig (configXml) {
|
||||
{ xmlKey: 'GradlePluginKotlinEnabled', gradleKey: 'IS_GRADLE_PLUGIN_KOTLIN_ENABLED', type: Boolean },
|
||||
{ xmlKey: 'AndroidJavaSourceCompatibility', gradleKey: 'JAVA_SOURCE_COMPATIBILITY', type: Number },
|
||||
{ xmlKey: 'AndroidJavaTargetCompatibility', gradleKey: 'JAVA_TARGET_COMPATIBILITY', type: Number },
|
||||
{ xmlKey: 'AndroidKotlinJVMTarget', gradleKey: 'KOTLIN_JVM_TARGET', type: String }
|
||||
{ xmlKey: 'AndroidKotlinJVMTarget', gradleKey: 'KOTLIN_JVM_TARGET', type: String },
|
||||
{ xmlKey: 'AndroidShowDeprecations', gradleKey: 'JAVA_SHOW_DEPRECATIONS', type: Boolean }
|
||||
];
|
||||
|
||||
return configXmlToGradleMapping.reduce((config, mapping) => {
|
||||
|
||||
@@ -40,6 +40,18 @@ allprojects {
|
||||
}
|
||||
|
||||
repositories repos
|
||||
|
||||
subprojects {
|
||||
afterEvaluate {
|
||||
tasks.withType(JavaCompile).tap {
|
||||
configureEach {
|
||||
if (cordovaConfig.JAVA_SHOW_DEPRECATIONS == true) {
|
||||
options.compilerArgs += "-Xlint:deprecation"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
||||
Reference in New Issue
Block a user