amino-os / Amino.Run-Demos

Amino.Run - Demo Applications
Apache License 2.0
5 stars 6 forks source link

Added a gradle file at root level with tasks common to the amino system #74

Closed Vishwa4jeet closed 5 years ago

Vishwa4jeet commented 5 years ago

Based on review comment: https://github.com/Huawei-PaaS/DCAP-Sapphire-Examples/pull/66#discussion_r271095288

Created a common Gradle file at root level which takes care of tasks which are common to the amino system, like: genStubs, compileStubs, runoms, runks

With this change, the oms and ks for apps, can be directly run from the root directory using the command: ./gradlew :minnieTwitter:subprojects:runoms ./gradlew :minnieTwitter:subprojects:runks

The path above consists of :appname:subprojects since, android apps in the repo use both the android and java plugins. Ideally both these plugins cannot be applied at the same level. To avoid this issue apps in their current form use the android plugin at the root level and manage java plugin and all its related tasks under the subproject level.

Additionally this PR also has renaming of the MinnieTwitter app from (Minnie-Twitter -> minnieTwitter).

Fixes #75

  1. ./gradlew build log:
    
    root1@root1-ThinkPad-T440p:~/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples$ ./gradlew build

Task :chess:compileDebugJavaWithJavac Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Task :chess:compileReleaseJavaWithJavac Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Task :chess:lint Ran lint on variant release: 61 issues found Ran lint on variant debug: 61 issues found Wrote HTML report to file:///home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/chess/build/reports/lint-results.html Wrote XML report to file:///home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/chess/build/reports/lint-results.xml

Task :hanksTodo:compileDebugJavaWithJavac Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Task :hanksTodo:compileReleaseJavaWithJavac Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Task :hanksTodo:lint Ran lint on variant debug: 54 issues found Ran lint on variant release: 53 issues found Wrote HTML report to file:///home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/hanksTodo/build/reports/lint-results.html Wrote XML report to file:///home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/hanksTodo/build/reports/lint-results.xml

Task :minnieTwitter:compileDebugJavaWithJavac Note: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/minnieTwitter/src/main/java/amino/run/appexamples/minnietwitter/glue/AlertDialogManager.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Task :minnieTwitter:compileReleaseJavaWithJavac Note: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/minnieTwitter/src/main/java/amino/run/appexamples/minnietwitter/glue/AlertDialogManager.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Task :minnieTwitter:lint Ran lint on variant debug: 52 issues found Ran lint on variant release: 52 issues found Wrote HTML report to file:///home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/minnieTwitter/build/reports/lint-results.html Wrote XML report to file:///home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/minnieTwitter/build/reports/lint-results.xml

Task :chess:subprojects:genEngineStubs Apr 24, 2019 10:30:57 AM amino.run.compiler.StubGenerator main INFO: Generated stubs. src: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/chess/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/engine/, package: engine, dst: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/chess/src/main/java/engine/stubs/

Task :chess:subprojects:genStubs Apr 24, 2019 10:30:57 AM amino.run.compiler.StubGenerator main INFO: Generated stubs. src: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/chess/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/chessmanager/, package: chessmanager, dst: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/chess/src/main/java/chessmanager/stubs/

Task :hanksTodo:subprojects:genStubs Apr 24, 2019 10:30:57 AM amino.run.compiler.StubGenerator main INFO: Generated stubs. src: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/hanksTodo/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/amino/run/appexamples/hankstodo/app/, package: amino.run.appexamples.hankstodo.app, dst: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/hanksTodo/src/main/java/amino/run/appexamples/hankstodo/app/stubs/

Task :minnieTwitter:subprojects:genStubs Apr 24, 2019 10:30:57 AM amino.run.compiler.StubGenerator main INFO: Generated stubs. src: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/minnieTwitter/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/amino/run/appexamples/minnietwitter/app/, package: amino.run.appexamples.minnietwitter.app, dst: /home/root1/workspace/DCAP_Examp_2210/DCAP-Sapphire-Examples/minnieTwitter/src/main/java/amino/run/appexamples/minnietwitter/app/stubs/

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 46s 164 actionable tasks: 161 executed, 3 up-to-date



2. Chess App Run: 
![Selection_079](https://user-images.githubusercontent.com/36434930/56634468-bb412800-667f-11e9-9add-1b11da05d2c3.png)
![Selection_080](https://user-images.githubusercontent.com/36434930/56634477-c1cf9f80-667f-11e9-8a91-6a7e4b5bc4fd.png)
![Selection_081](https://user-images.githubusercontent.com/36434930/56634481-c5fbbd00-667f-11e9-841c-fd60d9f3d2b1.png)
![Selection_083](https://user-images.githubusercontent.com/36434930/56634258-f2630980-667e-11e9-893c-8145719d280e.png)

3. HanksTodo App Run: 
![Selection_085](https://user-images.githubusercontent.com/36434930/56634586-212daf80-6680-11e9-994d-222a3c120239.png)
![Selection_087](https://user-images.githubusercontent.com/36434930/56634684-7f5a9280-6680-11e9-88b1-8ca3c1fac3fe.png)
![Selection_084](https://user-images.githubusercontent.com/36434930/56634813-f5f79000-6680-11e9-8049-1f710153fbbf.png)

4. MinnieTwitter App Run: 
![Selection_089](https://user-images.githubusercontent.com/36434930/56635039-b41b1980-6681-11e9-9baf-a6042d344ae5.png)
![Selection_090](https://user-images.githubusercontent.com/36434930/56635041-b8473700-6681-11e9-8f2b-bb4ca6a5e9ab.png)
![Selection_088](https://user-images.githubusercontent.com/36434930/56635046-bb422780-6681-11e9-8bbf-e9a9976e8404.png)
quinton-hoole commented 5 years ago

@Vishwa4jeet Please attach a run log demonstrating that all of this still works correctly. Then we can merge this excellent PR.

Vishwa4jeet commented 5 years ago

@Vishwa4jeet Please attach a run log demonstrating that all of this still works correctly. Then we can merge this excellent PR.

Attached in PR description.