Skip to content

Commit dcf1fbd

Browse files
committed
improve andoird x flags
1 parent 3528b52 commit dcf1fbd

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

test-app/app/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ dependencies {
267267
supportVer = supportVersion
268268
}
269269

270-
if (project.hasProperty("useAndroidX")) {
270+
if (project.hasProperty("useAndroidX") && (useAndroidX || useAndroidX.toBoolean())) {
271271
def androidXLegacyVersion = "1.0.0"
272272
if (project.hasProperty("androidXLegacy")) {
273273
androidXLegacyVersion = androidXLegacy
@@ -560,9 +560,7 @@ task buildMetadata(type: JavaExec) {
560560
}
561561

562562
task makeAndroidXChanges << {
563-
if (project.hasProperty("useAndroidX")) {
564-
println "Executing makeAndroidXChanges"
565-
563+
if (project.hasProperty("useAndroidX") && (useAndroidX || useAndroidX.toBoolean())) {
566564
// code changes
567565
def codeTuples = new ArrayList<Tuple2<String, String>>()
568566
codeTuples.add(new Tuple2<String, String>('android\\.support\\.annotation\\.NonNull', 'androidx.annotation.NonNull'))

0 commit comments

Comments
 (0)