From 2e090249f398ad11abda5d477c3d89c9262ec7b5 Mon Sep 17 00:00:00 2001 From: szymonrybczak Date: Mon, 30 Dec 2024 12:05:53 +0100 Subject: [PATCH] fix: self code review --- .../templates/native-common/android/build.gradle | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/create-react-native-library/templates/native-common/android/build.gradle b/packages/create-react-native-library/templates/native-common/android/build.gradle index 8d3d71b4..d77d40b3 100644 --- a/packages/create-react-native-library/templates/native-common/android/build.gradle +++ b/packages/create-react-native-library/templates/native-common/android/build.gradle @@ -1,5 +1,4 @@ buildscript { - // Buildscript is evaluated before everything else so we can't use getExtOrDefault ext.getExtOrDefault = {name -> return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['<%- project.name -%>_' + name] } @@ -10,7 +9,7 @@ buildscript { } dependencies { - classpath "com.android.tools.build:gradle:${getExtOrDefault('gradleVersion')}" + classpath "com.android.tools.build:gradle:8.7.2" // noinspection DifferentKotlinGradleVersion classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}" } @@ -32,10 +31,6 @@ if (isNewArchitectureEnabled()) { apply plugin: "com.facebook.react" } -def getExtOrDefault(name) { - return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["<%- project.name -%>_" + name] -} - def getExtOrIntegerDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["<%- project.name -%>_" + name]).toInteger() }