-
Notifications
You must be signed in to change notification settings - Fork 43
refactor: remove deprecated apis from brownfield-gradle-plugin #367
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
Draft
hurali97
wants to merge
49
commits into
main
Choose a base branch
from
refactor/bgp/remove-deprecated-apis
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
3816288
feat: first approach - fails at not calling bundleRelaseAar for TPL
hurali97 93f742d
feat: second approach by exposing custom tasks - WIP
hurali97 b44fea1
feat: migrate manifest-merger and move others to explode-aar task
hurali97 3fd0526
feat: migrate processResources and processAssets
hurali97 fe2bbc1
feat: migrate jni libs processor
hurali97 25fb981
feat: migrate proguard processor
hurali97 22f7e93
feat: migrate data binding and cleanup
hurali97 f1b5497
refactor: cleanup
hurali97 925e8ee
refactor: cleanup
hurali97 c8fa281
fix: library namespace resolution
hurali97 9cd0328
perf: optimize explodeAarTask
hurali97 dbdde63
feat: improvements
hurali97 9b4e476
fix: add task dependency for JSBundle
hurali97 d75ceb7
refactor: cleanup
hurali97 c9027ef
refactor: remove duplicates
hurali97 ad03e5d
refactor: early return
hurali97 3626a34
Merge branch 'main' of github.com:callstack/react-native-brownfield i…
hurali97 c46e96c
fix: add explode as task dependency on preBuild
hurali97 196f381
feat: remove resolve during config phase OR needing another task
hurali97 7d0f302
fix: right place for evaluation dependency
hurali97 7689721
fix: expo published projects are now added in exploded aar
hurali97 9f81e85
fix: reduce duplication and fixed namespace resolution
hurali97 edbc789
refactor: cleanup
hurali97 1d6c47b
refactor: cleanup
hurali97 71a422c
refactor: cleanup
hurali97 4fd1297
perf: add gradle-profiler benchmarks and docs
hurali97 10b20d9
chore: bump BGP to alpha
hurali97 b290d56
chore: changeset
hurali97 f8ec3a7
refactor: remove unused plugin
hurali97 aef0f81
refactor: throw error
hurali97 809cc95
refactor: code review
hurali97 4b68b2c
refactor: guard artifact file
hurali97 88d07ba
refactor: code review
hurali97 f48113a
refactor: code review
hurali97 2b18b76
Merge branch 'main' of github.com:callstack/react-native-brownfield i…
hurali97 e88ea33
fix: errors after merge conflict
hurali97 edb363a
Merge branch 'main' of github.com:callstack/react-native-brownfield i…
hurali97 cf5c860
fix: resolve after merge conflicts
hurali97 617719f
fix: update after merge resolve
hurali97 ac34f34
refactor: drop old LibraryVariant
hurali97 b470c8e
refactor: use new library variant API for explode and bundle task
hurali97 2cd9bbf
refactor: fix JNI libs
hurali97 a3f2251
refactor: remove deprecated APIs
hurali97 d4a03d7
refactor: update proguard tasks
hurali97 d6633c1
refactor: update JNI tasks
hurali97 c6be621
refactor: remove deprecated API
hurali97 41393c4
refactor: make manifest merge reliable with AGP 9
hurali97 ce8327a
refactor: remove deprecated APIs
hurali97 725981f
Merge branch 'main' of github.com:callstack/react-native-brownfield i…
hurali97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@callstack/react-native-brownfield': minor | ||
| --- | ||
|
|
||
| Bump brownfield-gradle-plugin |
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
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
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
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
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
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
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
20 changes: 4 additions & 16 deletions
20
...rownfield/src/main/kotlin/com/callstack/react/brownfield/processors/AssetTaskProcessor.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,17 @@ | ||
| package com.callstack.react.brownfield.processors | ||
|
|
||
| import com.android.build.gradle.LibraryExtension | ||
| import com.android.build.gradle.api.LibraryVariant | ||
| import com.android.build.api.variant.LibraryVariant | ||
| import com.callstack.react.brownfield.utils.AndroidArchiveLibrary | ||
| import org.gradle.api.Project | ||
|
|
||
| object AssetTaskProcessor { | ||
| fun process( | ||
| variant: LibraryVariant, | ||
| project: Project, | ||
| aarLibraries: List<AndroidArchiveLibrary>, | ||
| ) { | ||
| val assetsTask = variant.mergeAssetsProvider.get() | ||
| val assetDirectories = aarLibraries.map { it.getAssetsDir() }.filter { it.exists() } | ||
|
|
||
| val androidExtension = project.extensions.getByName("android") as LibraryExtension | ||
| assetsTask.doFirst { | ||
| val filteredSourceSets = | ||
| androidExtension.sourceSets.filter { it.name == variant.name } | ||
|
|
||
| filteredSourceSets.forEach { sourceSet -> | ||
| val filteredAarLibs = aarLibraries.filter { it.getAssetsDir().exists() } | ||
| if (!filteredAarLibs.isEmpty()) { | ||
| sourceSet.assets.srcDirs(filteredAarLibs.map { it.getAssetsDir() }) | ||
| } | ||
| } | ||
| assetDirectories.forEach { assetDirectory -> | ||
| variant.sources.assets?.addStaticSourceDirectory(assetDirectory.path) | ||
| } | ||
| } | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Are you sure this is to remain?
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.
Ah no 😄 Self review of this PR is pending, will do it Monday!
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.
Alright :D