-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ar/expo 52 #1276
Ar/expo 52 #1276
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
node_modules/ | ||
.expo/ | ||
dist/ | ||
expo-env.d.ts | ||
npm-debug.* | ||
*.jks | ||
*.p8 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
|
||
buildscript { | ||
ext { | ||
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '34.0.0' | ||
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '23') | ||
compileSdkVersion = 34 | ||
targetSdkVersion = 34 | ||
kotlinVersion = "1.9.23" | ||
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '35.0.0' | ||
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '24') | ||
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35') | ||
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34') | ||
kotlinVersion = "1.9.24" | ||
Comment on lines
+5
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Update Kotlin Gradle plugin to match the Kotlin version The Apply this diff to update the plugin version: dependencies {
classpath('com.android.tools.build:gradle:8.5.0')
classpath('com.facebook.react:react-native-gradle-plugin')
- classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath("io.sentry:sentry-android-gradle-plugin:3.11.1")
classpath 'com.google.gms:google-services:4.4.0'
}
|
||
|
||
ndkVersion = "26.1.10909125" | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,7 @@ org.gradle.jvmargs=-Xmx4608m -XX:MaxMetaspaceSize=2g | |
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true | ||
|
||
# Automatically convert third-party libraries to use AndroidX | ||
android.enableJetifier=true | ||
android.enablePngCrunchInReleaseBuilds=true | ||
|
||
# Use this property to specify which architecture you want to build. | ||
# You can also override it from the CLI using | ||
|
@@ -47,3 +46,9 @@ expo.webp.enabled=true | |
# Enable animated webp support (~3.4 MB increase) | ||
# Disabled by default because iOS doesn't support animated webp | ||
expo.webp.animated=false | ||
|
||
# Enable network inspector | ||
EX_DEV_CLIENT_NETWORK_INSPECTOR=true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disable network inspector in production builds
Apply a conditional check to set this property only in debug builds. |
||
|
||
# Use legacy packaging to compress native libraries in the resulting APK. | ||
expo.useLegacyPackaging=false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
pluginManagement { | ||
includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile().toString()) | ||
} | ||
Comment on lines
+1
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid using Using |
||
|
||
plugins { id("com.facebook.react.settings") } | ||
|
||
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex -> | ||
if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') { | ||
ex.autolinkLibrariesFromCommand() | ||
} else { | ||
def command = [ | ||
'node', | ||
'--no-warnings', | ||
'--eval', | ||
'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))', | ||
'react-native-config', | ||
'--json', | ||
'--platform', | ||
'android' | ||
].toList() | ||
ex.autolinkLibrariesFromCommand(command) | ||
} | ||
} | ||
|
||
rootProject.name = 'Converse' | ||
|
||
dependencyResolutionManagement { | ||
|
@@ -11,8 +35,5 @@ dependencyResolutionManagement { | |
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle"); | ||
useExpoModules() | ||
|
||
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); | ||
applyNativeModulesSettingsGradle(settings) | ||
|
||
include ':app' | ||
includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Build configuration properties partially defined
The review requires adjustment as only some of the referenced properties are defined in gradle.properties:
android.enablePngCrunchInReleaseBuilds
is defined and set to trueexpo.useLegacyPackaging
is defined and set to falseandroid.enableShrinkResourcesInReleaseBuilds
is missing from the configurationThe build will use the default fallback values for undefined properties as implemented in build.gradle, but it's recommended to explicitly define all configurable properties for better maintainability.
🔗 Analysis chain
LGTM: Enhanced build configuration flexibility
The changes improve resource management by making shrinkResources, crunchPngs, and useLegacyPackaging configurable through properties. This allows for better control over the build process.
Also applies to: 171-171
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 289
Script:
Length of output: 2562