Skip to content
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

Add support for AGP 8.4 #120

Merged
merged 5 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 2 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'dev.google.webcrypto'
}
namespace 'dev.google.webcrypto'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dumb question, but do we not need this anymore?

Will minSdkVersion 21 make AGP < 4.2 irrelevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGP 8.4 rejects AndroidManifest.xml files with a package attribute. If we only set the namespace for AGP ≥ 4.2, then on AGP < 4.2 we won't define any namespace at all and the build will fail anyways.

I think it's reasonable to ask library users to upgrade AGP ≥ 4.2 when upgrading webcrypto.dart.


compileSdkVersion 31

Expand All @@ -53,7 +50,7 @@ android {
}

defaultConfig {
minSdkVersion 16
minSdkVersion 21
emersion marked this conversation as resolved.
Show resolved Hide resolved
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
Expand Down
3 changes: 1 addition & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.webcrypto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
Loading