Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,20 @@ class RNAndroid extends Platform.Android implements RNPlatform {
'android:versionName="1.0.0"',
);

//// Build the release APK with R8 and resource shrinking, like a production app.
// The SDK looks up some resources by name (Resources.getIdentifier), which the shrinker cannot trace.
// Without a keep rule shipped by the SDK, they are removed and the tests fail.
TestUtil.replaceString(
buildGradle,
'def enableProguardInReleaseBuilds = false',
'def enableProguardInReleaseBuilds = true',
);
TestUtil.replaceString(
buildGradle,
'minifyEnabled enableProguardInReleaseBuilds',
'minifyEnabled enableProguardInReleaseBuilds\n shrinkResources true',
);

//// Replace the MainApplication.java with the correct server url and deployment key
const string = path.join(innerprojectDirectory, 'android', 'app', 'src', 'main', 'res', 'values', 'strings.xml');
TestUtil.replaceString(string, TestUtil.SERVER_URL_PLACEHOLDER, this.getServerUrl());
Expand Down
Loading