-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
feat: many new android features #5774
base: main
Are you sure you want to change the base?
Conversation
Along with that we simply need to have a cli parameter and an option in nativescript.config
# Conflicts: # lib/services/plugins-service.ts
fix: require.resolve for packages with exports field in package.json
can still be enabled with `generateBuildConfig` and `generateR`
# Conflicts: # lib/services/log-source-map-service.ts # lib/services/metadata-filtering-service.ts # lib/services/test-execution-service.ts # vendor/gradle-plugin/build.gradle
# Conflicts: # lib/services/android-plugin-build-service.ts # vendor/gradle-plugin/build.gradle
and other gradle scripts
# Conflicts: # vendor/gradle-app/app/build.gradle
@rigor789 any chance to boost this one so that it gets merged? @edusperoni i think you did some work around gradle? I still have to fix the why i need this https://github.com/farfromrefug/nativescript-cli/blob/new_big_merge_test/vendor/gradle-app/app/build.gradle#L986. There is something wrong with our buildMetadata task which makes all tasks depends on 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.
This is a very large changeset - I tried to look through and note things that jumped out.
The tests are also failing:
Test results
1428 passing (23s)
35 failing
1) update controller method tests
handles exact versions:
TypeError: this.$projectDataService.getProjectData(...).getBuildRelativeDirectoryPath is not a function
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:299:46)
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/controllers/update-controller.js:8:71
at new Promise (<anonymous>)
at __awaiter (lib/controllers/update-controller.js:4:12)
at UpdateController.cleanUpProject (lib/controllers/update-controller.js:154:16)
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:112:14)
at Generator.next (<anonymous>)
at fulfilled (lib/controllers/update-controller.js:5:58)
2) update controller method tests
handles range versions:
TypeError: this.$projectDataService.getProjectData(...).getBuildRelativeDirectoryPath is not a function
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:299:46)
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/controllers/update-controller.js:8:71
at new Promise (<anonymous>)
at __awaiter (lib/controllers/update-controller.js:4:12)
at UpdateController.cleanUpProject (lib/controllers/update-controller.js:154:16)
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:112:14)
at Generator.next (<anonymous>)
at fulfilled (lib/controllers/update-controller.js:5:58)
3) update controller method tests
handles range versions:
TypeError: this.$projectDataService.getProjectData(...).getBuildRelativeDirectoryPath is not a function
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:299:46)
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/controllers/update-controller.js:8:71
at new Promise (<anonymous>)
at __awaiter (lib/controllers/update-controller.js:4:12)
at UpdateController.cleanUpProject (lib/controllers/update-controller.js:154:16)
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:112:14)
at Generator.next (<anonymous>)
at fulfilled (lib/controllers/update-controller.js:5:58)
4) update controller method tests
handles latest tag versions:
TypeError: this.$projectDataService.getProjectData(...).getBuildRelativeDirectoryPath is not a function
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:299:46)
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/controllers/update-controller.js:8:71
at new Promise (<anonymous>)
at __awaiter (lib/controllers/update-controller.js:4:12)
at UpdateController.cleanUpProject (lib/controllers/update-controller.js:154:16)
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:112:14)
at Generator.next (<anonymous>)
at fulfilled (lib/controllers/update-controller.js:5:58)
5) update controller method tests
handles existing tag versions:
TypeError: this.$projectDataService.getProjectData(...).getBuildRelativeDirectoryPath is not a function
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:299:46)
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/controllers/update-controller.js:8:71
at new Promise (<anonymous>)
at __awaiter (lib/controllers/update-controller.js:4:12)
at UpdateController.cleanUpProject (lib/controllers/update-controller.js:154:16)
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:112:14)
at Generator.next (<anonymous>)
at fulfilled (lib/controllers/update-controller.js:5:58)
6) update controller method tests
handles non-existing tag versions:
TypeError: this.$projectDataService.getProjectData(...).getBuildRelativeDirectoryPath is not a function
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:299:46)
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/controllers/update-controller.js:8:71
at new Promise (<anonymous>)
at __awaiter (lib/controllers/update-controller.js:4:12)
at UpdateController.cleanUpProject (lib/controllers/update-controller.js:154:16)
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:112:14)
at Generator.next (<anonymous>)
at fulfilled (lib/controllers/update-controller.js:5:58)
7) update controller method tests
handles partially existing tag versions:
TypeError: this.$projectDataService.getProjectData(...).getBuildRelativeDirectoryPath is not a function
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:299:46)
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/controllers/update-controller.js:8:71
at new Promise (<anonymous>)
at __awaiter (lib/controllers/update-controller.js:4:12)
at UpdateController.cleanUpProject (lib/controllers/update-controller.js:154:16)
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:112:14)
at Generator.next (<anonymous>)
at fulfilled (lib/controllers/update-controller.js:5:58)
8) update controller method tests
handles no version - falls back to latest:
TypeError: this.$projectDataService.getProjectData(...).getBuildRelativeDirectoryPath is not a function
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:299:46)
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/controllers/update-controller.js:8:71
at new Promise (<anonymous>)
at __awaiter (lib/controllers/update-controller.js:4:12)
at UpdateController.cleanUpProject (lib/controllers/update-controller.js:154:16)
at UpdateController.<anonymous> (lib/controllers/update-controller.ts:112:14)
at Generator.next (<anonymous>)
at fulfilled (lib/controllers/update-controller.js:5:58)
9) Plugins service
plugin add
fails when the plugin does not support the installed framework:
Error: unable to resolve liveSyncProcessDataService
at Yok.resolveDependency (lib/common/yok.ts:521:10)
at Yok.resolveByName (lib/common/yok.ts:488:22)
at Yok.resolve (lib/common/yok.ts:416:16)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/common/yok.ts:460:17
at Array.map (<anonymous>)
at Yok.resolveConstructor (lib/common/yok.ts:456:42)
at Yok.resolveByName (lib/common/yok.ts:505:21)
at Yok.resolve (lib/common/yok.ts:416:16)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/common/yok.ts:460:17
at Array.map (<anonymous>)
at Yok.resolveConstructor (lib/common/yok.ts:456:42)
at Yok.resolveByName (lib/common/yok.ts:505:21)
at Yok.resolve (lib/common/yok.ts:416:16)
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/plugins-service.ts:427:47
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/plugins-service.js:8:71
at new Promise (<anonymous>)
at __awaiter (test/plugins-service.js:4:12)
at Context.<anonymous> (test/plugins-service.ts:377:84)
at processImmediate (node:internal/timers:478:21)
10) Plugins service
plugin install
fails when the plugin does not support the installed framework:
Error: unable to resolve liveSyncProcessDataService
at Yok.resolveDependency (lib/common/yok.ts:521:10)
at Yok.resolveByName (lib/common/yok.ts:488:22)
at Yok.resolve (lib/common/yok.ts:416:16)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/common/yok.ts:460:17
at Array.map (<anonymous>)
at Yok.resolveConstructor (lib/common/yok.ts:456:42)
at Yok.resolveByName (lib/common/yok.ts:505:21)
at Yok.resolve (lib/common/yok.ts:416:16)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/common/yok.ts:460:17
at Array.map (<anonymous>)
at Yok.resolveConstructor (lib/common/yok.ts:456:42)
at Yok.resolveByName (lib/common/yok.ts:505:21)
at Yok.resolve (lib/common/yok.ts:416:16)
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/plugins-service.ts:427:47
at Generator.next (<anonymous>)
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/plugins-service.js:8:71
at new Promise (<anonymous>)
at __awaiter (test/plugins-service.js:4:12)
at Context.<anonymous> (test/plugins-service.ts:377:84)
at processImmediate (node:internal/timers:478:21)
11) androidPluginBuildService
buildAar
builds aar when all supported files are in the plugin:
TypeError: Cannot read properties of undefined (reading 'android')
at AndroidPluginBuildService.<anonymous> (lib/services/android-plugin-build-service.ts:394:34)
at Generator.next (<anonymous>)
at fulfilled (lib/services/android-plugin-build-service.js:11:58)
12) androidPluginBuildService
buildAar
builds aar when there are res and assets folders:
TypeError: Cannot read properties of undefined (reading 'android')
at AndroidPluginBuildService.<anonymous> (lib/services/android-plugin-build-service.ts:394:34)
at Generator.next (<anonymous>)
at fulfilled (lib/services/android-plugin-build-service.js:11:58)
13) androidPluginBuildService
buildAar
builds aar when there is an android manifest:
TypeError: Cannot read properties of undefined (reading 'android')
at AndroidPluginBuildService.<anonymous> (lib/services/android-plugin-build-service.ts:394:34)
at Generator.next (<anonymous>)
at fulfilled (lib/services/android-plugin-build-service.js:11:58)
14) androidPluginBuildService
buildAar
builds aar when plugin is already build and source files have changed since last buid:
TypeError: Cannot read properties of undefined (reading 'android')
at AndroidPluginBuildService.<anonymous> (lib/services/android-plugin-build-service.ts:394:34)
at Generator.next (<anonymous>)
at fulfilled (lib/services/android-plugin-build-service.js:11:58)
15) androidPluginBuildService
buildAar
builds aar with the latest runtime gradle versions when no project dir is specified:
TypeError: Cannot read properties of undefined (reading 'android')
at AndroidPluginBuildService.<anonymous> (lib/services/android-plugin-build-service.ts:394:34)
at Generator.next (<anonymous>)
at fulfilled (lib/services/android-plugin-build-service.js:11:58)
16) androidPluginBuildService
buildAar
builds aar with the latest runtime gradle versions when a project dir without runtime versions is specified:
TypeError: Cannot read properties of undefined (reading 'android')
at AndroidPluginBuildService.<anonymous> (lib/services/android-plugin-build-service.ts:394:34)
at Generator.next (<anonymous>)
at fulfilled (lib/services/android-plugin-build-service.js:11:58)
17) androidPluginBuildService
buildAar
builds aar with the specified runtime gradle versions when the project runtime has gradle versions:
TypeError: Cannot read properties of undefined (reading 'android')
at AndroidPluginBuildService.<anonymous> (lib/services/android-plugin-build-service.ts:394:34)
at Generator.next (<anonymous>)
at fulfilled (lib/services/android-plugin-build-service.js:11:58)
18) androidPluginBuildService
buildAar
builds aar with the hardcoded gradle versions when the project runtime and the latest runtime do not have versions specified:
TypeError: Cannot read properties of undefined (reading 'android')
at AndroidPluginBuildService.<anonymous> (lib/services/android-plugin-build-service.ts:394:34)
at Generator.next (<anonymous>)
at fulfilled (lib/services/android-plugin-build-service.js:11:58)
19) androidProjectService
"before each" hook for "release no bundle":
Error: unable to resolve liveSyncProcessDataService
at Yok.resolveDependency (lib/common/yok.ts:521:10)
at Yok.resolveByName (lib/common/yok.ts:488:22)
at Yok.resolve (lib/common/yok.ts:416:16)
at /Users/rigor789/Code/NativeScript/nativescript-cli/lib/common/yok.ts:460:17
at Array.map (<anonymous>)
at Yok.resolveConstructor (lib/common/yok.ts:456:42)
at Yok.resolveByName (lib/common/yok.ts:505:21)
at Yok.resolve (lib/common/yok.ts:416:16)
at Context.<anonymous> (test/services/android-project-service.ts:88:36)
at processImmediate (node:internal/timers:478:21)
20) GradleBuildArgsService
getBuildTaskArgs
should return correct args for debug build with info log:
AssertionError: expected [ 'assembleDebug', '--quiet', …(12) ] to deeply equal [ 'assembleDebug', '--quiet', …(9) ]
+ expected - actual
[
"assembleDebug"
"--quiet"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
]
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
21) GradleBuildArgsService
getBuildTaskArgs
should return correct args for debug build with trace log:
AssertionError: expected [ 'assembleDebug', …(14) ] to deeply equal [ 'assembleDebug', …(11) ]
+ expected - actual
[
"assembleDebug"
"--stacktrace"
"--debug"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
]
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
22) GradleBuildArgsService
getBuildTaskArgs
should return correct args for release build with info log:
AssertionError: expected [ 'assembleRelease', '--quiet', …(17) ] to deeply equal [ 'assembleRelease', '--quiet', …(14) ]
+ expected - actual
[
"assembleRelease"
"--quiet"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
"-Prelease"
"-PksPath=/var/folders/7_/qj96kqbd2jz83dlnh9v97p7w0000gn/T/ksPath2024213-80054-1ddb9qk.yi07h"
"-Palias=keyStoreAlias"
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
23) GradleBuildArgsService
getBuildTaskArgs
should return correct args for release build with trace log:
AssertionError: expected [ 'assembleRelease', …(19) ] to deeply equal [ 'assembleRelease', …(16) ]
+ expected - actual
[
"assembleRelease"
"--stacktrace"
"--debug"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
"-Prelease"
"-PksPath=/var/folders/7_/qj96kqbd2jz83dlnh9v97p7w0000gn/T/ksPath2024213-80054-1ddb9qk.yi07h"
"-Palias=keyStoreAlias"
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
24) GradleBuildArgsService
getBuildTaskArgs
should return correct args for debug build with info log and android bundle:
AssertionError: expected [ 'bundleDebug', '--quiet', …(12) ] to deeply equal [ 'bundleDebug', '--quiet', …(9) ]
+ expected - actual
[
"bundleDebug"
"--quiet"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
]
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
25) GradleBuildArgsService
getBuildTaskArgs
should return correct args for debug build with trace log and android bundle:
AssertionError: expected [ Array(15) ] to deeply equal [ Array(12) ]
+ expected - actual
[
"bundleDebug"
"--stacktrace"
"--debug"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
]
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
26) GradleBuildArgsService
getBuildTaskArgs
should return correct args for release build with info log and android bundle:
AssertionError: expected [ 'bundleRelease', '--quiet', …(17) ] to deeply equal [ 'bundleRelease', '--quiet', …(14) ]
+ expected - actual
[
"bundleRelease"
"--quiet"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
"-Prelease"
"-PksPath=/var/folders/7_/qj96kqbd2jz83dlnh9v97p7w0000gn/T/ksPath2024213-80054-1ddb9qk.yi07h"
"-Palias=keyStoreAlias"
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
27) GradleBuildArgsService
getBuildTaskArgs
should return correct args for release build with trace log and android bundle:
AssertionError: expected [ 'bundleRelease', …(19) ] to deeply equal [ 'bundleRelease', …(16) ]
+ expected - actual
[
"bundleRelease"
"--stacktrace"
"--debug"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
"-Prelease"
"-PksPath=/var/folders/7_/qj96kqbd2jz83dlnh9v97p7w0000gn/T/ksPath2024213-80054-1ddb9qk.yi07h"
"-Palias=keyStoreAlias"
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
28) GradleBuildArgsService
getCleanTaskArgs
should return correct args for debug clean build with info log:
AssertionError: expected [ 'clean', '--quiet', …(12) ] to deeply equal [ 'clean', '--quiet', …(9) ]
+ expected - actual
[
"clean"
"--quiet"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
]
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
29) GradleBuildArgsService
getCleanTaskArgs
should return correct args for debug clean build with trace log:
AssertionError: expected [ 'clean', '--stacktrace', …(13) ] to deeply equal [ 'clean', '--stacktrace', …(10) ]
+ expected - actual
[
"clean"
"--stacktrace"
"--debug"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
]
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
30) GradleBuildArgsService
getCleanTaskArgs
should return correct args for release clean build with info log:
AssertionError: expected [ 'clean', '--quiet', …(17) ] to deeply equal [ 'clean', '--quiet', …(14) ]
+ expected - actual
[
"clean"
"--quiet"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
"-Prelease"
"-PksPath=/var/folders/7_/qj96kqbd2jz83dlnh9v97p7w0000gn/T/ksPath2024213-80054-1ddb9qk.yi07h"
"-Palias=keyStoreAlias"
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
31) GradleBuildArgsService
getCleanTaskArgs
should return correct args for release clean build with trace log:
AssertionError: expected [ 'clean', '--stacktrace', …(18) ] to deeply equal [ 'clean', '--stacktrace', …(15) ]
+ expected - actual
[
"clean"
"--stacktrace"
"--debug"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
"-Prelease"
"-PksPath=/var/folders/7_/qj96kqbd2jz83dlnh9v97p7w0000gn/T/ksPath2024213-80054-1ddb9qk.yi07h"
"-Palias=keyStoreAlias"
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
32) GradleBuildArgsService
getCleanTaskArgs
should return correct args for debug clean build with info log and android bundle:
AssertionError: expected [ 'clean', '--quiet', …(12) ] to deeply equal [ 'clean', '--quiet', …(9) ]
+ expected - actual
[
"clean"
"--quiet"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
]
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
33) GradleBuildArgsService
getCleanTaskArgs
should return correct args for debug clean build with trace log and android bundle:
AssertionError: expected [ 'clean', '--stacktrace', …(13) ] to deeply equal [ 'clean', '--stacktrace', …(10) ]
+ expected - actual
[
"clean"
"--stacktrace"
"--debug"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
]
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
34) GradleBuildArgsService
getCleanTaskArgs
should return correct args for release clean build with info log and android bundle:
AssertionError: expected [ 'clean', '--quiet', …(17) ] to deeply equal [ 'clean', '--quiet', …(14) ]
+ expected - actual
[
"clean"
"--quiet"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
"-Prelease"
"-PksPath=/var/folders/7_/qj96kqbd2jz83dlnh9v97p7w0000gn/T/ksPath2024213-80054-1ddb9qk.yi07h"
"-Palias=keyStoreAlias"
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
35) GradleBuildArgsService
getCleanTaskArgs
should return correct args for release clean build with trace log and android bundle:
AssertionError: expected [ 'clean', '--stacktrace', …(18) ] to deeply equal [ 'clean', '--stacktrace', …(15) ]
+ expected - actual
[
"clean"
"--stacktrace"
"--debug"
- "--stacktrace"
"-PcompileSdk=android-28"
"-PtargetSdk=26"
"-PbuildToolsVersion=my-build-tools-version"
"-PgenerateTypings=true"
+ "-DprojectRoot=/path/to/projectDir"
"-PprojectRoot=/path/to/projectDir"
- "-DprojectRoot=/path/to/projectDir"
"-PappPath=/path/to/projectDir/app"
"-PappBuildPath=platforms"
- "-DappBuildPath=platforms"
- "-PappPath=/path/to/projectDir/app"
"-PappResourcesPath=/path/to/projectDir/app/App_Resources"
"-Prelease"
"-PksPath=/var/folders/7_/qj96kqbd2jz83dlnh9v97p7w0000gn/T/ksPath2024213-80054-1ddb9qk.yi07h"
"-Palias=keyStoreAlias"
at /Users/rigor789/Code/NativeScript/nativescript-cli/test/services/android/gradle-build-args-service.ts:57:11
at Generator.next (<anonymous>)
at fulfilled (test/services/android/gradle-build-args-service.js:5:58)
lib/data/build-data.ts
Outdated
@@ -58,6 +60,8 @@ export class AndroidBuildData extends BuildData { | |||
this.keyStoreAliasPassword = data.keyStoreAliasPassword; | |||
this.keyStorePassword = data.keyStorePassword; | |||
this.androidBundle = data.androidBundle || data.aab; | |||
this.buildFilterDevicesArch = !this.androidBundle && data.filterDevicesArch !== false ; | |||
this.gradleFlavor = data.flavor; |
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.
Should this be named data.gradleFlavor
for consistency?
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.
I can yes. But to me flavor
is more of an android option than a gradle option. I mean gradlePath
and gradleArgs
are options for the gradle "tool".
Let me know what you prefer and i ll change
Co-authored-by: Igor Randjelovic <[email protected]>
Co-authored-by: Igor Randjelovic <[email protected]>
Co-authored-by: Igor Randjelovic <[email protected]>
@rigor789 I am sorry I resolved by mistake the conflicts I pushed fixes for... |
Co-authored-by: Igor Randjelovic <[email protected]>
# Conflicts: # lib/services/plugins-service.ts
@rigor789 now all tests are passing here |
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.
return regexp.test(entry); | ||
}); | ||
if (files.length === 0) { | ||
changesInfo.nativeChanged = true; |
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.
@farfromrefug this seems to be causing a rebuild every time you run ns debug android
.
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.
@farfromrefug possible to adjust that portion to not rebuild on initial run?
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.
@NathanWalker we started discussing that with @rigor789. I proposed to add a test to detect universal builds (through apk name). If we agree on that (or another solution) i ll implement it
Thought it was time to make that big PR. It is quite impossible now to divide everything as each part depends on the other.
I really hope we can make that work for everyone to enjoy the new features.
I ll try to list them all. Dont hesitate if you have questions
@nativescript/gradle
plugin.ns config
#5773syncChangedDataOnDevices
#5772TODO
There is one thing i would like to improve which is this. I commented on the reason why we need that.
Though i am sure we might find a better solution. The issue with the way i did it if that if new task are added (either tools update of maybe through plugin) that list will need to be update which is ugly. I already had to add tasks added by the sentry plugin...
Maybe @triniwiz you know a way to do it better. I know the reason is that by reading the buildMetada task (or the tasks it depends on like those handling jars) gradle thinks
buildMetadata
uses as an input the output of all those tasks. TBH i dont really understand fully the code of thebuildMetadata
task ...