Skip to content

Commit 6387263

Browse files
committed
refactor(lint, android): use import for gradle version in package build scripts
quiets IDE warning
1 parent f4f9917 commit 6387263

15 files changed

Lines changed: 32 additions & 15 deletions

File tree

packages/analytics/android/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* groovylint-disable DuplicateStringLiteral */
2+
3+
import com.android.Version
24
import io.invertase.gradle.common.PackageJson
35

46
buildscript {
@@ -117,7 +119,7 @@ if (rootProject.ext && rootProject.ext.firebaseJson) {
117119
}
118120

119121
android {
120-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
122+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
121123
if (agpVersion >= 7) {
122124
namespace = 'io.invertase.firebase.analytics'
123125
}

packages/app-check/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23

34
buildscript {
@@ -60,7 +61,7 @@ project.ext {
6061
}
6162

6263
android {
63-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
6465
if (agpVersion >= 7) {
6566
namespace = 'io.invertase.firebase.appcheck'
6667
}

packages/app-distribution/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23

34
buildscript {
@@ -60,7 +61,7 @@ project.ext {
6061
}
6162

6263
android {
63-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
6465
if (agpVersion >= 7) {
6566
namespace = 'io.invertase.firebase.appdistribution'
6667
}

packages/app/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23
import org.gradle.internal.jvm.Jvm
34

@@ -60,7 +61,7 @@ if (rootProject.ext && rootProject.ext.firebaseJson) {
6061
}
6162

6263
android {
63-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
6465
if (agpVersion >= 7) {
6566
namespace = 'io.invertase.firebase'
6667
}

packages/auth/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23

34
buildscript {
@@ -59,7 +60,7 @@ project.ext {
5960
}
6061

6162
android {
62-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
63+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
6364
if (agpVersion >= 7) {
6465
namespace = 'io.invertase.firebase.auth'
6566
}

packages/crashlytics/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23

34
buildscript {
@@ -60,7 +61,7 @@ project.ext {
6061
}
6162

6263
android {
63-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
6465
if (agpVersion >= 7) {
6566
namespace = 'io.invertase.firebase.crashlytics'
6667
}

packages/database/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23

34
buildscript {
@@ -60,7 +61,7 @@ project.ext {
6061
}
6162

6263
android {
63-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
6465
if (agpVersion >= 7) {
6566
namespace = 'io.invertase.firebase.database'
6667
}

packages/firestore/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23

34
buildscript {
@@ -60,7 +61,7 @@ project.ext {
6061
}
6162

6263
android {
63-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
6465
if (agpVersion >= 7) {
6566
namespace = 'io.invertase.firebase.firestore'
6667
}

packages/functions/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23

34
buildscript {
@@ -60,7 +61,7 @@ project.ext {
6061
}
6162

6263
android {
63-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
6465
if (agpVersion >= 7) {
6566
namespace = 'io.invertase.firebase.functions'
6667
}

packages/in-app-messaging/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.android.Version
12
import io.invertase.gradle.common.PackageJson
23

34
buildscript {
@@ -82,7 +83,7 @@ if (rootProject.ext && rootProject.ext.firebaseJson) {
8283
}
8384

8485
android {
85-
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
86+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
8687
if (agpVersion >= 7) {
8788
namespace = 'io.invertase.firebase.fiam'
8889
}

0 commit comments

Comments
 (0)