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

Include gradle-maven-push only when props are set #2727

Merged
merged 1 commit into from
Mar 9, 2019

Conversation

friederbluemle
Copy link
Contributor

This fixes a build error seen in app projects if the properties are not set.
I missed to include this in #2720

The gradle-maven-push.gradle script is only needed when publishing artifacts to a maven repository. It is not needed for apps consuming the library (and should not be included).

Does any other open PR do the same thing?

No

What issue is this PR fixing?

Issue reported by @grifotv in #2720

How did you test this PR?

  • Create a new project using react-native init and follow react-native-maps integration steps
  • Use different dependencies in package.json:
Dependency Result
"react-native-maps": "^0.23.0" ✔️ Success
"react-native-maps": "react-native-community/react-native-maps" 🔴 Failure
"react-native-maps": "friederbluemle/react-native-maps#fix-gradle-build" ✔️ Success

The gradle-maven-push.gradle script is only needed when publishing
artifacts to a maven repository.
This fixes a build error seen in app projects if the properties are not
set.
@alvelig alvelig merged commit c102c36 into react-native-maps:master Mar 9, 2019
@grifotv
Copy link
Contributor

grifotv commented Mar 9, 2019

@friederbluemle Thanks for fixing this so quickly. I can confirm that I don't have that issue when building anymore.

However, I can confirm I get the error Exception in HostObject::get: <unknown> in Android only unfortunately.

Screenshot 2019-03-09 at 15 55 06

  • react-native: next
  • react-native-maps: https://github.com/react-community/react-native-maps.git

I can also confirm that when building and running the app using the version of react-native-maps prior to the #2720 PR, it works fine.

Please let me know if there's anything I can do to help solving this issue.

@friederbluemle friederbluemle deleted the fix-gradle-build branch March 10, 2019 08:18
@friederbluemle
Copy link
Contributor Author

Thanks so much for the additional testing @grifotv 👍 - I'm looking into it now!

@grifotv
Copy link
Contributor

grifotv commented Mar 10, 2019

As React Native 0.59 will be released in the next couple of days, it would be great to have a compatible version of react-native-maps.

Thanks for all the hard work @friederbluemle !

@friederbluemle
Copy link
Contributor Author

@grifotv - Can you please provide some additional info on the project you're trying to build?
I tested the both the included example and a new RN app set up with react-native init and integrated react-native-maps (0.23.0 and master) - both work fine for me. I still have to try next of react-native though.

@grifotv
Copy link
Contributor

grifotv commented Mar 11, 2019

@friederbluemle Exactly, my setup is using next of react-native and master of react-native-maps.

But if I use this version https://github.com/react-community/react-native-maps.git#4978696d9c904bfbd3213a910b410830be558f8d it works fine.

4978696d9c904bfbd3213a910b410830be558f8d would be the commit prior to your initial PR.

@friederbluemle
Copy link
Contributor Author

I just tried again, using the latest pre-release (next) of React Native (which at the moment resolves to 0.59.0-rc.3), together with the master branch of this project. I was able to build and run it successfully.

Did you use react-native init, or a different setup?

@grifotv
Copy link
Contributor

grifotv commented Mar 11, 2019

After noticing that even the version of the previous commit (4978696d9c904bfbd3213a910b410830be558f8d) was crashing on Android 9 but not 8, I did some research and found out that I needed to update the Gradle dependencies to the following:

    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 27
        supportLibVersion = "28.0.0"
        googlePlayServicesVersion = "15.0.1"
        androidMapsUtilsVersion = "0.5+"
    }

After that, I tested again the latest from master and I can confirm it's working without problems.

@friederbluemle thanks for taking the time to look into it anyway 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants