refactor(plugin): remove the unused flatDir injection - #14
Merged
Merged
Conversation
withDocuSignAndroidStrippedAarFlatDir added an afterEvaluate flatDir block
to the root build.gradle so Gradle could find the stripped sdk-pdf AAR.
Since 1.0.4 the module's android/build.gradle references that AAR by file
path, because Gradle 9 stopped honoring subproject-scoped flatDir, so the
block had no effect. On current Expo templates it was never written either:
its pattern allowed one level of braces inside allprojects, and the
template's maven { url ... } entry inside repositories is two.
The mod, its marker, its Kotlin Script warning telling projects to add the
block by hand, and the comments describing it are gone. A new test pins the
plugin's only build.gradle change to the DocuSign repository line; it
failed while the flatDir mod was still registered.
In an Expo SDK 57 app, prebuild from the packed branch produced a
build.gradle byte-identical to the previous package's output and the
Android release build passed checkReleaseDuplicateClasses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the config plugin step that injected a
flatDirblock into the consumer's rootandroid/build.gradle. It had no effect, and on current Expo templates it never ran. This is the last change planned before publishing 2.0.0.Why
android/build.gradlehas referenced the stripped sdk-pdf AAR by file path since 1.0.4 (implementation files("$projectDir/libs/sdk-pdf-2.1.7-stripped.aar")). That change was made because Gradle 9 stopped honoring subproject-scopedflatDir. Nothing reads aflatDirrepository anymore.allprojects. The Expo template'smaven { url 'https://www.jitpack.io' }insiderepositoriesis two levels, so on SDK 55 to 57 the block was never written andexpo prebuildsaid nothing.flatDirinstructions they did not need.Changes
plugin/src/index.ts: deleteswithDocuSignAndroidStrippedAarFlatDir,FLAT_DIR_MARKER, the.ktswarning and the call inwithDocuSign. Two comments now describe the file-path reference instead.plugin/src/index.test.ts: a new test asserts the onlybuild.gradlechange the plugin makes is the DocuSign repository line.README.md: the Glide workaround section no longer says a flatDir injection picks up the AAR.CHANGELOG.md: a 2.0.0 Fixes entry.Verification
projectBuildGradlemod chain.tsc, build, lint, examples type-check and all 101 Jest tests pass.build.gradlebyte-identical to the previous package's output, with one DocuSign maven line and no flatDir block.checkReleaseDuplicateClasses.2fd1e06. It found no remaining reader of aflatDirrepository inandroid/,plugin/,scripts/,docs/or the README, and confirmedgit log -Sdates the file-path reference to the 1.0.4 release commit.Notes
react-native-docusign-stripped-aar-flatdirblock in a checked-inandroid/build.gradle. It stays inert and is safe to delete.expo prebuild --cleanremoves it.plugin/src/index.tsreads 43%, down from 49%, because the deleted mod was code the tests exercised. The untested part is the same as before: the AAR download, strip and cache paths.