★ wanayoo — archive 1999 https://github.com/NativeScript/android-runtime/pull/1642Nouvelle recherche | Portail wanayoo
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

fix: build.gradle & kotlinVersion #1642

Merged
merged 1 commit into from Oct 16, 2020
Merged

fix: build.gradle & kotlinVersion #1642

merged 1 commit into from Oct 16, 2020

Conversation

@NathanaelA
Copy link
Member

@NathanaelA NathanaelA commented Oct 13, 2020

Fix for Ticket 781


Not sure if it was broken from a change in Gradle Versions; but the "BeforeEvaluate" function does NOT get called before the setting of the kotlinVersion in the top group. So any external properties set in gradle.properties are NOT set at the point we check for it. Copying the code to the top section in the initialize fixes the issue, additional tests will need to be done to see if we can just remove the beforeEvaluate section without any negative side effects. (So leaving that for now, as worst case is it re-assigns the same value to the same key).

Not sure if it is a change in Gradle Versions; but the "BeforeEvaluate"  function does NOT get called before the setting of the `kotlinVersion` in the top group.  So any external properties set in `gradle.properties` are NOT set at the point we check for it.   Copying the code to the top section in the `initialize` fixes the issue, however more tests will need to be done to see if we can just remove the beforeEvaluate section without any negative side effects.
@cla-bot cla-bot bot added the cla: yes label Oct 13, 2020
@NathanaelA NathanaelA requested a review from rigor789 Oct 13, 2020
@dev4s
Copy link
Contributor

@dev4s dev4s commented Oct 13, 2020

Hi @NathanaelA,
things that I see in the logs:

> Task :app:runSbg
org.json.JSONException: Expected a ',' or '}' at character 120
at org.json.JSONTokener.syntaxError(JSONTokener.java:410)
	at org.json.JSONObject.<init>(JSONObject.java:222)
	at org.json.JSONObject.<init>(JSONObject.java:402)
	at org.nativescript.staticbindinggenerator.Main.traverseDirectory(Main.java:163)
	at org.nativescript.staticbindinggenerator.Main.traverseDirectory(Main.java:193)
	at org.nativescript.staticbindinggenerator.Main.traverseDirectory(Main.java:193)
	at org.nativescript.staticbindinggenerator.Main.traverseDirectory(Main.java:193)
	at org.nativescript.staticbindinggenerator.Main.traverseDirectory(Main.java:193)
	at org.nativescript.staticbindinggenerator.Main.generateJsInputFile(Main.java:68)
	at org.nativescript.staticbindinggenerator.Main.main(Main.java:48)
Detailed log here: /home/travis/build/NativeScript/android-runtime/test-app/build-tools/runSbg.log
> Task :waitForUnitTestResultFile
Waiting for tests to finish...
adb: error: remote object '/data/data/com.tns.testapplication/android_unit_test_results.xml' does not exist
com.tns.testapplication process is running
adb: error: remote object '/data/data/com.tns.testapplication/android_unit_test_results.xml' does not exist
com.tns.testapplication process is running
adb: error: remote object '/data/data/com.tns.testapplication/android_unit_test_results.xml' does not exist
com.tns.testapplication process is running
adb: error: remote object '/data/data/com.tns.testapplication/android_unit_test_results.xml' does not exist
com.tns.testapplication process is running
adb: error: remote object '/data/data/com.tns.testapplication/android_unit_test_results.xml' does not exist
com.tns.testapplication process is running
adb: error: remote object '/data/data/com.tns.testapplication/android_unit_test_results.xml' does not exist
com.tns.testapplication process died or never started!
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':runTestsAndVerifyResults'.
@NathanaelA
Copy link
Member Author

@NathanaelA NathanaelA commented Oct 13, 2020

@dev4s - That error is from a SBG and processing some JS code (wish it said which file, going to have to dig into the SBG and figure out what it failed at), which is interesting that it occurred on Travis as the code is supposed to be checked out cleanly, so not sure why it failed.

The changes I did would only effect gradle loading of parameters and would have no effect on SBG processing.

But thanks for your keen eye!

@NathanaelA
Copy link
Member Author

@NathanaelA NathanaelA commented Oct 14, 2020 •

The test version of this runtime is 7.0.1-rc1 and currently tagged rc

@NathanaelA
Copy link
Member Author

@NathanaelA NathanaelA commented Oct 16, 2020

I have verified BOTH sections are needed, The new "added" code allows the first section to parse the kotlinVersion if it is set.
The second section is needed for the rest of the Gradle plugin. This PR is good to go.

@NathanaelA NathanaelA merged commit 59bcc08 into master Oct 16, 2020
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
verification/cla-signed
Details
@NathanaelA NathanaelA deleted the NathanaelA-patch-1 branch Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.