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

[Deps] Bump gl native 10.4.0 beta.2 #1175

Merged
merged 4 commits into from
Feb 23, 2022
Merged

Conversation

ank27
Copy link
Contributor

@ank27 ank27 commented Feb 22, 2022

Summary of changes

Bump gl-native to 10.4.0-beta.2
Revert common.so changes.

User impact (optional)

Pull request checklist:

  • Briefly describe the changes in this PR.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality. If tests were not written, please explain why.
  • Optimize code for java consumption (@JvmOverloads, @file:JvmName, etc).
  • Add example if relevant.
  • Document any changes to public APIs.
  • Run ./gradlew apiDump to update generated api files, if there's public API changes, otherwise the verify-kotlin-binary-compatibility CI will fail.
  • Apply changelog label ('breaking change', 'bug 🪲', 'build', 'docs', 'feature 🍏', 'performance ⚡', 'testing 💯') or use the label 'skip changelog'
  • Add an entry inside this element for inclusion in the mapbox-maps-android changelog: <changelog></changelog>.
  • If this PR is a v10.[version] release branch fix / enhancement, merge it to main firstly and then port to v10.[version] release branch.

Fixes: < Link to related issues that will be fixed by this pull request, if they exist >

PRs must be submitted under the terms of our Contributor License Agreement CLA.

@ank27 ank27 added the dependencies Pull requests that update a dependency file label Feb 22, 2022
@ank27 ank27 self-assigned this Feb 22, 2022
@ank27 ank27 force-pushed the ak-bump-gl-native-10.4.0-beta.2 branch from 9f50a1c to 1d3d338 Compare February 22, 2022 16:54
@ank27 ank27 marked this pull request as ready for review February 22, 2022 16:56
@ank27 ank27 requested a review from a team as a code owner February 22, 2022 16:56
@@ -58,7 +58,6 @@ android {
if (buildFromSource.toBoolean()) {
jniLibs.pickFirsts.add("**/libc++_shared.so")
}
jniLibs.pickFirsts.add("**/libmapbox-common.so")
Copy link
Contributor

Choose a reason for hiding this comment

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

We still need it when build from source

@@ -35,7 +35,6 @@ android {
if (buildFromSource.toBoolean()) {
jniLibs.pickFirsts.add("**/libc++_shared.so")
}
jniLibs.pickFirsts.add("**/libmapbox-common.so")
Copy link
Contributor

Choose a reason for hiding this comment

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

The same here

@@ -35,7 +35,6 @@ android {
if (buildFromSource.toBoolean()) {
jniLibs.pickFirsts.add("**/libc++_shared.so")
}
jniLibs.pickFirsts.add("**/libmapbox-common.so")
Copy link
Contributor

Choose a reason for hiding this comment

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

The same here

Copy link
Contributor

Choose a reason for hiding this comment

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

@Chaoba with previous gradle plugin it was more of an AGP bug that so from previous build was not cleared properly leading to duplicate error. Cleaning build directories fixed that. If that issue is fixed with new gradle plugin - we indeed do not need it here I guess.
@ank27 any more comments here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes correct, and since gl-native exclude common.so as well, we don't need this here.

Copy link
Member

Choose a reason for hiding this comment

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

the common.so could be duplicated when building from source, and it was

if (buildFromSource.toBoolean()) {
    packagingOptions {
      pickFirst("**/libc++_shared.so")
      pickFirst("**/libmapbox-common.so")
    }
  }
}

before the v10.4.0-beta.1 bump, we should probably move jniLibs.pickFirsts.add("**/libmapbox-common.so") to the if (buildFromSource.toBoolean()) closure.

Copy link
Contributor

Choose a reason for hiding this comment

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

@pengdev as I've described here those conditions were related to an issue in older AGP and could be fixed locally by cleaning previous build files. IMO we should remove it from end application gradle files to see if issue is resolved now and even if it's not - AFAIR we have a step in build from source section noting to call make clean before building from source. If we leave it - we may simply hide some error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Earlier releases of gl-native did not exclude common.so explicitly from packagingOptions, i guess that's why pickFirst was added in the above config. If i understand correctly even building from source, the libs files are packaged as per packaginOptions in gradle. since now we exclude common.so from package with 10.4.0-beta.2, it shouldn't matter if we pickFirst in the config above. But we can keep it just be sure, wdyt? 🤔

Copy link
Member

@pengdev pengdev Feb 23, 2022

Choose a reason for hiding this comment

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

we can remove it and if we encounter issues while building from source, we add it back 🙂 Better to verify build from source first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can remove it and if we encounter issues while building from source, we add it back 🙂 Better to verify build from source first.

Attached internal ticket points to this pr which has buildFromSource passed. I think that would be fine to verify this behaviour?

@@ -35,7 +35,6 @@ android {
if (buildFromSource.toBoolean()) {
jniLibs.pickFirsts.add("**/libc++_shared.so")
Copy link
Contributor

Choose a reason for hiding this comment

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

@ank27 do we need that by the way? I was under an impression that gl-native does not contain libc++_shared and only common does and in that case we don't need pick first

Copy link
Contributor Author

@ank27 ank27 Feb 23, 2022

Choose a reason for hiding this comment

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

Technically we don't need this as well, since only common adds this and gl-native exclude it. But I guess we can keep it the same as before.
Also, I don't know if any other project builds libc++_shared.so file, why was this added in the first place?

Copy link
Member

Choose a reason for hiding this comment

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

This is used for building from source, where I think gl-native indeed will bundle the libc++_shared.so when built from source, we could verify it by building the project from source.

@ank27 ank27 force-pushed the ak-bump-gl-native-10.4.0-beta.2 branch from 1d3d338 to 181cc5f Compare February 23, 2022 08:58
.circleci/config.yml Outdated Show resolved Hide resolved
@ank27 ank27 force-pushed the ak-bump-gl-native-10.4.0-beta.2 branch from bf9e702 to 300405c Compare February 23, 2022 15:51
@ank27 ank27 merged commit 9ed0084 into main Feb 23, 2022
@ank27 ank27 deleted the ak-bump-gl-native-10.4.0-beta.2 branch February 23, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants