Skip to content

Conversation

@jamespearson
Copy link

Allow versions to be set via config, rather than hard coded. This is becoming the standard for React Native modules.

Config example, in build.gradle:

buildscript {
    ext {
	buildToolsVersion = "27.0.3"
	minSdkVersion = 21
	compileSdkVersion = 27
	targetSdkVersion = 26
	supportLibVersion = "27.1.1"
    }
}

This would also remove the need for the following to be merged: #520 #502 #487 #459

@gtebbutt
Copy link

gtebbutt commented Feb 1, 2019

@jamespearson Since you're replacing several other commits, it would also be useful to change compile 'com.facebook.react:react-native:0.12.+' to implementation 'com.facebook.react:react-native:+'.

It'll fix an issue that's arisen between RN 0.57 and RN 0.58: facebook/react-native#22033 (comment)

@paulmelnikow
Copy link
Collaborator

Hi @jamespearson, thanks so much for this! It seems like a great way to resolve this ongoing issue.

Could you add a section to the readme explaining with that configuration snippet and explaining how to use it?

}

dependencies {
compileOnly 'com.facebook.react:react-native:+'

Choose a reason for hiding this comment

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

First of all, thanks for the contribution. I'm waiting for this PR to be merged. And It would be better if you replace "compileOnly" with "implementation".

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @abdurrahmanekr, could you include a link that explains why that’s better?

Choose a reason for hiding this comment

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

Hi @paulmelnikow, I was actually going to say what @gtebbutt said.

Copy link
Collaborator

Choose a reason for hiding this comment

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

To be merged this needs some documentation in the readme. Would you be up for adding that? You could make a new branch off master with these commits and then add the documentation.

Would be great to get this merged!

Copy link

@abdurrahmanekr abdurrahmanekr Sep 3, 2019

Choose a reason for hiding this comment

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

Yes, I would like to contribute but I don't think the use of this should be written on README because it is now available on most plugins. Because the user does not need to make any settings. The "buildscript.ext" variable in the <project dir> /android/build.gradle file is actually "rootProject.ext". This link can be an example. You want a sentence like I wrote?

@RomualdPercereau RomualdPercereau self-assigned this Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants