Skip to content

Commit

Permalink
Add fix for older Android Gradle plugin (#4707)
Browse files Browse the repository at this point in the history
* Add fix for older android gradle plugin

* Add fallback for older android gradle plugin

* Add changelog

* Revert change to test app build.gradle so we are testing the older version on CI
  • Loading branch information
Tom Duncalf authored Jul 6, 2022
1 parent 1d2cdc9 commit 67c6559
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ x.x.x Release notes (yyyy-MM-dd)
* None.

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-js/issues/????), since v?.?.?)
* None.
* Fixed inadvertent change to minimum Android Gradle plugin version ([#4706](https://github.com/realm/realm-js/issues/4706), since v10.19.4)

### Compatibility
* Atlas App Services.
Expand Down
6 changes: 5 additions & 1 deletion react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ android {
buildTypes {
debug {
packagingOptions {
jniLibs.keepDebugSymbols += "**/librealm.so"
if (com.android.builder.model.Version.ANDROID_GRADLE_PLUGIN_VERSION.compareTo("4.2") >= 0) {
jniLibs.keepDebugSymbols += "**/librealm.so"
} else {
doNotStrip "**/librealm.so"
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ReactTestApp/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
jcenter()
}
dependencies {
classpath('com.android.tools.build:gradle:4.2.2')
classpath('com.android.tools.build:gradle:4.1.2')
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 67c6559

Please sign in to comment.