naoufal / react-native-touch-id

React Native authentication with the native Touch ID popup.
https://www.npmjs.com/package/react-native-touch-id
1.47k stars 477 forks source link

Update build.gradle #219

Closed SaeedZhiany closed 5 years ago

SaeedZhiany commented 5 years ago

read android gradle plugin version from user project

SaeedZhiany commented 5 years ago

Who have tested this commit? It breaks android build

@Dimon70007 My bad and I'm sorry. are you familiar with gradle build system? if yes, can you help me to make it works? I think it's a good idea if we can read gradle plugin version from the user project, just like the other options (e.g. compileSdkVersion). I already open an issue on react-native repository for this.

Can you post what's the error message you get on building android?

if no @zibs please revert my changes on this PR.

Dimon70007 commented 5 years ago

I get error when run any gradle task:

ERROR: Could not get unknown property '_ext' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Dimon70007 commented 5 years ago

@SaeedZhiany, I am not sure, but you can try something like this - https://gist.github.com/Dimon70007/238a7a0371183c6ed4bea8a97bef6437

Dimon70007 commented 5 years ago

more info - https://medium.com/@jagonzalez.develop/how-manage-android-plugin-for-gradle-version-in-a-team-df66b904c6b2

SaeedZhiany commented 5 years ago

@SaeedZhiany, I am not sure, but you can try something like this - https://gist.github.com/Dimon70007/238a7a0371183c6ed4bea8a97bef6437

have you tested this yourself?

Dimon70007 commented 5 years ago

have you tested this yourself?

This build.gradle does not crash the build, but i did not tested it for what version it uses if i specify buildGradlePluginVersion in the rooProject

lchenfox commented 4 years ago

I get error when run any gradle task:

ERROR: Could not get unknown property '_ext' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Today I got the same error with react-native run-android

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/langke/Developer/JTool/node_modules/react-native-touch-id/android/build.gradle' line: 17

* What went wrong:
A problem occurred evaluating project ':react-native-touch-id'.
> Could not get unknown property '_ext' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
SaeedZhiany commented 4 years ago

Sorry about the build failure, I currently submit another PR here to fix the problem, @zibs please review that PR. thanks