-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
lazy configure ReactAndroid gradle tasks #26314
Conversation
@friederbluemle @gengjiawen please review |
Awesome, it's working for me locally! 👍 Thanks @dulmandakh 🎉 |
@friederbluemle please approve it if it worked 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accepting and landing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdvacca is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@mdvacca any news? |
trying one more time... |
Summary: Gradle wrapper `5.6.2` Supersedes and closes #26227 ## Changelog [Android] [Changed] - Gradle wrapper 5.6.2 Pull Request resolved: #26349 Test Plan: Builds successfully (just like the current `master` branch, **only** after either reverting 4763000 **or** cherry-picking 7f23878 from #26314) Differential Revision: D17224299 Pulled By: mdvacca fbshipit-source-id: cbd1b3d5d686e284fdc8e3f6faaeaa93654b301d
@dulmandakh this PR keeps failing with the following error:
I think the change from Line 213 is affecting the build? |
@mdvacca - Which task are you running that is failing? |
@mdvacca please make sure that you have NDK installed and ANDROID_NDK environment variable points to it. |
@mdvacca the :ReactAndroid:buildReactNdkLib task works as expected if NDK is set |
@cpojer please merge |
I just tested this again, and it (still) works. 👍 |
@dulmandakh CI is failing with the same error @mdvacca mentioned above. Could you fix that first? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was successfully merged by @dulmandakh in 7c8e266. When will my fix make it into a release? | Upcoming Releases |
Summary: ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from **android** when it wasn't configured completely. ```java extensionSupplier.get()!!.compileSdkVersion must not be null ``` or ```java compileSdkVersion is not specified. ``` It is happening because **buildReactNdkLib** task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from **android** when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically. [Android] [Changed] - lazily configure ReactAndroid gradle tasks Pull Request resolved: facebook#26314 Test Plan: ./gradlew ReactAndroid:tasks run without errors, while master throws exception. Differential Revision: D17177945 Pulled By: cpojer fbshipit-source-id: c7a165092157d2059f946da70b801d1a475d4b8c (cherry picked from commit 7c8e266)
Summary: ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from **android** when it wasn't configured completely. ```java extensionSupplier.get()!!.compileSdkVersion must not be null ``` or ```java compileSdkVersion is not specified. ``` It is happening because **buildReactNdkLib** task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from **android** when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically. ## Changelog [Android] [Changed] - lazily configure ReactAndroid gradle tasks Pull Request resolved: facebook#26314 Test Plan: ./gradlew ReactAndroid:tasks run without errors, while master throws exception. Differential Revision: D17177945 Pulled By: cpojer fbshipit-source-id: c7a165092157d2059f946da70b801d1a475d4b8c
Summary: ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from **android** when it wasn't configured completely. ```java extensionSupplier.get()!!.compileSdkVersion must not be null ``` or ```java compileSdkVersion is not specified. ``` It is happening because **buildReactNdkLib** task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from **android** when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically. ## Changelog [Android] [Changed] - lazily configure ReactAndroid gradle tasks Pull Request resolved: facebook#26314 Test Plan: ./gradlew ReactAndroid:tasks run without errors, while master throws exception. Differential Revision: D17177945 Pulled By: cpojer fbshipit-source-id: c7a165092157d2059f946da70b801d1a475d4b8c
Summary: ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from **android** when it wasn't configured completely. ```java extensionSupplier.get()!!.compileSdkVersion must not be null ``` or ```java compileSdkVersion is not specified. ``` It is happening because **buildReactNdkLib** task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from **android** when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically. ## Changelog [Android] [Changed] - lazily configure ReactAndroid gradle tasks Pull Request resolved: facebook#26314 Test Plan: ./gradlew ReactAndroid:tasks run without errors, while master throws exception. Differential Revision: D17177945 Pulled By: cpojer fbshipit-source-id: c7a165092157d2059f946da70b801d1a475d4b8c
Summary: ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from **android** when it wasn't configured completely. ```java extensionSupplier.get()!!.compileSdkVersion must not be null ``` or ```java compileSdkVersion is not specified. ``` It is happening because **buildReactNdkLib** task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from **android** when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically. ## Changelog [Android] [Changed] - lazily configure ReactAndroid gradle tasks Pull Request resolved: facebook#26314 Test Plan: ./gradlew ReactAndroid:tasks run without errors, while master throws exception. Differential Revision: D17177945 Pulled By: cpojer fbshipit-source-id: c7a165092157d2059f946da70b801d1a475d4b8c
Summary: ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from **android** when it wasn't configured completely. ```java extensionSupplier.get()!!.compileSdkVersion must not be null ``` or ```java compileSdkVersion is not specified. ``` It is happening because **buildReactNdkLib** task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from **android** when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically. ## Changelog [Android] [Changed] - lazily configure ReactAndroid gradle tasks Pull Request resolved: facebook#26314 Test Plan: ./gradlew ReactAndroid:tasks run without errors, while master throws exception. Differential Revision: D17177945 Pulled By: cpojer fbshipit-source-id: c7a165092157d2059f946da70b801d1a475d4b8c
Summary: ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from **android** when it wasn't configured completely. ```java extensionSupplier.get()!!.compileSdkVersion must not be null ``` or ```java compileSdkVersion is not specified. ``` It is happening because **buildReactNdkLib** task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from **android** when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically. ## Changelog [Android] [Changed] - lazily configure ReactAndroid gradle tasks Pull Request resolved: facebook#26314 Test Plan: ./gradlew ReactAndroid:tasks run without errors, while master throws exception. Differential Revision: D17177945 Pulled By: cpojer fbshipit-source-id: c7a165092157d2059f946da70b801d1a475d4b8c
Summary
ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from android when it wasn't configured completely.
or
It is happening because buildReactNdkLib task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from android when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically.
Changelog
[Android] [Changed] - lazily configure ReactAndroid gradle tasks
Test Plan
./gradlew ReactAndroid:tasks run without errors, while master throws exception.