nativescript-cli: CLI 8.2.x cannot build plugin with targetSdk 32 and buildTools 32.0.0

Issue Description

When running ns plugin build using NS CLI 8.2.x, the following error raises:

FAILURE: Build failed with an exception.

* Where:
Build file '/private/var/folders/5q/6zrvvtkj5_g7l948bjdttwwr0000gn/T/android-project2022230-40036-1rbjm2o.grn5/nativescript_context_apis/build.gradle' line: 38

* What went wrong:
A problem occurred evaluating root project 'nativescript_context_apis'.
> /private/var/folders/5q/6zrvvtkj5_g7l948bjdttwwr0000gn/platforms/android/dependencies.json (No such file or directory)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 461ms
Failed to build plugin nativescript-context-apis : 
Error: Command ./gradlew failed with exit code 1

Rolling back to CLI 8.1.5 temporally fixes the problem (defaults to targetSdk 31 and buildTools 30.0.3).

Reproduction

https://github.com/GeoTecINIT/nativescript-context-apis

  1. Install latest NS CLI version
  2. clone
  3. cd publish
  4. run ./pack.sh

Relevant log output (if applicable)

Trying to get macOS version.
Exec system_profiler SPSoftwareDataType -detailLevel mini 
 stdout: Software:

    System Software Overview:

      System Version: macOS 12.2.1 (21D62)
      Kernel Version: Darwin 21.3.0

 
 stderr: 
macOS version based on system_profiler is 12.2.
Looking for project in '~/nativescript-context-apis/src'
Project directory is '~/nativescript-context-apis/src'.
No config file found - falling back to ~/nativescript-context-apis/src/nativescript.config.ts.
Project Config Service using legacy configuration...
failed to add embedded package.json data to config Error: ENOENT: no such file or directory, open '~/nativescript-context-apis/src/app/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at FileSystem.readFile (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:192:19)
    at FileSystem.readText (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:202:21)
    at FileSystem.readJson (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:205:27)
    at ProjectConfigService.fallbackToLegacyNSConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:238:50)
    at ProjectConfigService.readConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:139:25)
    at ProjectData.initializeProjectDataFromContent (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/project-data.js:61:45)
    at ProjectData.initializeProjectData (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/project-data.js:50:22)
    at new ProjectDataService (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-data-service.js:40:25) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/nativescript-context-apis/src/app/package.json'
}
Initializing project identifiers. Config:  {}
Loading extensions.
Collecting system information...
System information:
{
  "platform": "darwin",
  "shell": "/bin/zsh",
  "os": "Darwin endpriv100.scom-glt.uminho.pt 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101 arm64\n",
  "procArch": "arm64",
  "nodeVer": "16.13.1",
  "npmVer": "8.3.2",
  "nodeGypVer": null,
  "nativeScriptCliVersion": "8.2.3",
  "gitVer": "2.32.0 (Apple Git-132)",
  "dotNetVer": null,
  "javacVersion": "11.0.11",
  "javaVersion": "11.0.11",
  "javaPath": "~/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.8139111/Android Studio.app/Contents/jre/Contents/Home/bin/java",
  "adbVer": "1.0.41",
  "androidInstalled": true,
  "monoVer": null,
  "gradleVer": null,
  "isAndroidSdkConfiguredCorrectly": true,
  "xcodeVer": "13.3.0",
  "xcodeprojLocation": "/opt/homebrew/bin/xcodeproj",
  "itunesInstalled": false,
  "cocoaPodsVer": "1.11.2",
  "isCocoaPodsWorkingCorrectly": true,
  "isCocoaPodsUpdateRequired": false,
  "pythonInfo": {
    "isInstalled": true,
    "isSixPackageInstalled": true
  }
}
Current CLI version:  8.2.3
Project dir from hooksArgs is: undefined.
Hooks directories: [
  '~/nativescript-context-apis/src/hooks'
]
No config file found - falling back to ~/nativescript-context-apis/src/nativescript.config.ts.
Project Config Service using legacy configuration...
failed to add embedded package.json data to config Error: ENOENT: no such file or directory, open '~/nativescript-context-apis/src/app/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at FileSystem.readFile (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:192:19)
    at FileSystem.readText (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:202:21)
    at FileSystem.readJson (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:205:27)
    at ProjectConfigService.fallbackToLegacyNSConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:238:50)
    at ProjectConfigService.readConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:139:25)
    at ProjectConfigService.getValue (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:157:27)
    at HooksService.initialize (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:50:56)
    at HooksService.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:80:18) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/nativescript-context-apis/src/app/package.json'
}
BeforeHookName for command resolveCommand is before-resolveCommand
No config file found - falling back to ~/nativescript-context-apis/src/nativescript.config.ts.
Project Config Service using legacy configuration...
failed to add embedded package.json data to config Error: ENOENT: no such file or directory, open '~/nativescript-context-apis/src/app/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at FileSystem.readFile (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:192:19)
    at FileSystem.readText (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:202:21)
    at FileSystem.readJson (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:205:27)
    at ProjectConfigService.fallbackToLegacyNSConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:238:50)
    at ProjectConfigService.readConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:139:25)
    at ProjectConfigService.getValue (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:157:27)
    at HooksService.getCustomHooksByName (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:182:56)
    at HooksService.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:87:42) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/nativescript-context-apis/src/app/package.json'
}
Project dir from hooksArgs is: undefined.
Hooks directories: [
  '~/nativescript-context-apis/src/hooks'
]
No config file found - falling back to ~/nativescript-context-apis/src/nativescript.config.ts.
Project Config Service using legacy configuration...
failed to add embedded package.json data to config Error: ENOENT: no such file or directory, open '~/nativescript-context-apis/src/app/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at FileSystem.readFile (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:192:19)
    at FileSystem.readText (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:202:21)
    at FileSystem.readJson (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:205:27)
    at ProjectConfigService.fallbackToLegacyNSConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:238:50)
    at ProjectConfigService.readConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:139:25)
    at ProjectConfigService.getValue (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:157:27)
    at HooksService.initialize (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:50:56)
    at HooksService.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:80:18) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/nativescript-context-apis/src/app/package.json'
}
AfterHookName for command resolveCommand is after-resolveCommand
No config file found - falling back to ~/nativescript-context-apis/src/nativescript.config.ts.
Project Config Service using legacy configuration...
failed to add embedded package.json data to config Error: ENOENT: no such file or directory, open '~/nativescript-context-apis/src/app/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at FileSystem.readFile (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:192:19)
    at FileSystem.readText (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:202:21)
    at FileSystem.readJson (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:205:27)
    at ProjectConfigService.fallbackToLegacyNSConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:238:50)
    at ProjectConfigService.readConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:139:25)
    at ProjectConfigService.getValue (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:157:27)
    at HooksService.getCustomHooksByName (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:182:56)
    at HooksService.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:87:42) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/nativescript-context-apis/src/app/package.json'
}
Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.
The stackTrace of the location trying to handle SIGINT is:
    at process.on (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/nativescript-cli.js:26:28)
    at ~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/node_modules/signal-exit/index.js:158:17
    at Array.filter (<anonymous>)
    at load (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/node_modules/signal-exit/index.js:156:23)
    at module.exports (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/node_modules/signal-exit/index.js:62:7)
    at Object.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/node_modules/proper-lockfile/lib/lockfile.js:331:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
spawn: ~/.nvm/versions/node/v16.13.1/bin/node "~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/detached-processes/cleanup-process.js" "~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/bootstrap.js"
Initializing analytics statuses.
Analytics statuses:  { TrackFeatureUsage: 'enabled', TrackExceptions: 'enabled' }
Will send the following information to Google Analytics: {
  type: 'googleAnalyticsData',
  category: 'CLI',
  googleAnalyticsDataType: 'pageview',
  path: 'plugin build',
  title: 'plugin build',
  customDimensions: { cd5: 'CLI', cd2: 'Pure TypeScript', cd9: 'false' }
}
spawn: ~/.nvm/versions/node/v16.13.1/bin/node "~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/analytics/analytics-broker-process.js" "~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/bootstrap.js"
Will send the following information to Google Analytics: {
  type: 'googleAnalyticsData',
  category: 'CLI',
  googleAnalyticsDataType: 'event',
  action: 'Options',
  label: '{"log":"trace","$0":"ns","profileDir":"private","bundle":"webpack"}',
  customDimensions: { cd2: 'Pure TypeScript', cd9: 'false', cd5: 'CLI' },
  value: undefined
}
Shasum of file ~/nativescript-context-apis/src/platforms/android/README.md is 45f2f63427be0a461a7e2dfd5ff0ad5bab64068f
Shasum of file ~/nativescript-context-apis/src/platforms/android/AndroidManifest.xml is a49c6297b29f6fca5b1b61650dae089ff2181ba0
Shasum of file ~/nativescript-context-apis/src/platforms/android/include.gradle is c5d0724464fa299cfa6642b73471c394124e08da
Shasum of file ~/nativescript-context-apis/src/platforms/android/contextapis-release.aar is 92983b4b520ca94459e16bdc33cb26cf4ca8b2e8
No config file found - falling back to ~/nativescript-context-apis/src/nativescript.config.ts.
Project Config Service using legacy configuration...
failed to add embedded package.json data to config Error: ENOENT: no such file or directory, open '~/nativescript-context-apis/src/app/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at FileSystem.readFile (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:192:19)
    at FileSystem.readText (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:202:21)
    at FileSystem.readJson (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:205:27)
    at ProjectConfigService.fallbackToLegacyNSConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:238:50)
    at ProjectConfigService.readConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:139:25)
    at ProjectConfigService.getValue (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:157:27)
    at PackageManager.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/package-manager.js:108:61)
    at Generator.next (<anonymous>) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/nativescript-context-apis/src/app/package.json'
}
Exec npm view @nativescript/android  dist-tags --json 
 stdout: {
  "rc": "8.2.0-rc.0",
  "latest": "8.2.2",
  "alpha": "8.2.0-alpha.11"
}
 
 stderr: 
Exec npm view @nativescript/android@8.2.2  version_info --json 
 stdout: {
  "v8": "8.3.110.9",
  "gradle": "7.4",
  "gradleAndroid": "7.1.2",
  "ndk": "r21",
  "ndkApiLevel": "122",
  "minSdk": "17",
  "compileSdk": "31",
  "buildTools": "31.0.0",
  "kotlin": "1.6.0"
}
 
 stderr: 
Got gradle versions {"gradleVersion":"7.4","gradleAndroidPluginVersion":"7.1.2"} from the latest runtime v8.2.2
Project dir from hooksArgs is: undefined.
Hooks directories: [
  '~/nativescript-context-apis/src/hooks'
]
No config file found - falling back to ~/nativescript-context-apis/src/nativescript.config.ts.
Project Config Service using legacy configuration...
failed to add embedded package.json data to config Error: ENOENT: no such file or directory, open '~/nativescript-context-apis/src/app/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at FileSystem.readFile (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:192:19)
    at FileSystem.readText (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:202:21)
    at FileSystem.readJson (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:205:27)
    at ProjectConfigService.fallbackToLegacyNSConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:238:50)
    at ProjectConfigService.readConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:139:25)
    at ProjectConfigService.getValue (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:157:27)
    at HooksService.initialize (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:50:56)
    at HooksService.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:80:18) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/nativescript-context-apis/src/app/package.json'
}
BeforeHookName for command buildAndroidPlugin is before-buildAndroidPlugin
No config file found - falling back to ~/nativescript-context-apis/src/nativescript.config.ts.
Project Config Service using legacy configuration...
failed to add embedded package.json data to config Error: ENOENT: no such file or directory, open '~/nativescript-context-apis/src/app/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at FileSystem.readFile (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:192:19)
    at FileSystem.readText (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:202:21)
    at FileSystem.readJson (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/file-system.js:205:27)
    at ProjectConfigService.fallbackToLegacyNSConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:238:50)
    at ProjectConfigService.readConfig (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:139:25)
    at ProjectConfigService.getValue (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/project-config-service.js:157:27)
    at HooksService.getCustomHooksByName (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:182:56)
    at HooksService.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/services/hooks-service.js:87:42) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/nativescript-context-apis/src/app/package.json'
}
Selected targetSdk is: 32
Installed Android Targets are:  [ 'android-29', 'android-30', 'android-31', 'android-32' ]
Selected buildToolsVersion is: 32.0.0
spawn: /var/folders/5q/6zrvvtkj5_g7l948bjdttwwr0000gn/T/android-project2022230-44184-xpwr89.jmdfq/nativescript_context_apis/gradlew "-p" "/var/folders/5q/6zrvvtkj5_g7l948bjdttwwr0000gn/T/android-project2022230-44184-xpwr89.jmdfq/nativescript_context_apis" "assembleRelease" "-PcompileSdk=android-32" "-PbuildToolsVersion=32.0.0" "-PappPath=~/nativescript-context-apis/src/app" "-PappResourcesPath=~/nativescript-context-apis/src/App_Resources"

FAILURE: Build failed with an exception.

* Where:
Build file '/private/var/folders/5q/6zrvvtkj5_g7l948bjdttwwr0000gn/T/android-project2022230-44184-xpwr89.jmdfq/nativescript_context_apis/build.gradle' line: 38

* What went wrong:
A problem occurred evaluating root project 'nativescript_context_apis'.
> /private/var/folders/5q/6zrvvtkj5_g7l948bjdttwwr0000gn/platforms/android/dependencies.json (No such file or directory)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 783ms
Failed to build plugin nativescript-context-apis : 
Error: Command ./gradlew failed with exit code 1
Error: Failed to build plugin nativescript-context-apis : 
Error: Command ./gradlew failed with exit code 1
    at Errors.failWithOptions (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/errors.js:157:27)
    at Errors.fail (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/common/errors.js:130:21)
    at AndroidPluginBuildService.<anonymous> (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/android-plugin-build-service.js:470:30)
    at Generator.throw (<anonymous>)
    at rejected (~/.nvm/versions/node/v16.13.1/lib/node_modules/nativescript/lib/services/android-plugin-build-service.js:12:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)


### Environment

```yaml
OS: macOS 12.2.1
CPU: (8) arm64 Apple M1
Shell: /bin/zsh
node: 16.13.1
npm: 8.3.2
nativescript: 8.2.3

# android
java: 11.0.11
ndk: Not Found
apis: 29, 30, 31, 32
build_tools: 29.0.0, 30.0.3, 32.0.0
system_images:
  - android-31 | Google Play ARM 64 v8a
  - android-32 | Google Play ARM 64 v8a

# ios
xcode: 13.3/13E113
cocoapods: 1.11.2
python: 2.7.18
python3: 3.8.9
ruby: 2.6.8
platforms:
  - DriverKit 21.4
  - iOS 15.4
  - macOS 12.3
  - tvOS 15.4
  - watchOS 8.5

Dependencies

"dependencies": {
  "@nativescript/geolocation": "^8.0.2",
  "@triniwiz/nativescript-couchbase": "~1.3.1",
  "nativescript-permissions": "1.3.11",
  "rxjs": "^7.5.5"
},
"devDependencies": {
  "@nativescript/core": "~8.2.0",
  "@nativescript/types": "~8.2.0",
  "prompt": "^1.0.0",
  "rimraf": "^2.6.3",
  "semver": "^5.6.0",
  "tslint": "^5.12.1",
  "typescript": "~4.5.5"
}

Please accept these terms

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (4 by maintainers)

Most upvoted comments

For everyone following, I can confirm that you can do the following to fix it:

  • Remove the .aar file from your platforms/android folder
  • Remove lines like this from the .npmignore file:
    • platforms/android/*
    • !platforms/android/include.gradle
    • !platforms/android/*.aar
    • !platforms/android/*.jar
  • Remove the tns plugin build part and scripts from your build process

See this commit for an example in my project.

This way it will ship the sources in platforms/android in your npm package and {N} will build it when people run an application that uses your plugin.

The build fails on the gradle side, why it does - I’m not sure yet, haven’t had a chance to dig deeper myself. Just thought I’d chime in on the SIGINT part to avoid going down that path, as it is definitely not the cause of the failure.

The SIGINT part is unrelated - that’s normal - it doesn’t indicate a failure

Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.
The stackTrace of the location trying to handle SIGINT is:
    at process.on (/usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:26:28)
    at /usr/local/lib/node_modules/nativescript/node_modules/signal-exit/index.js:158:17
    at Array.filter (<anonymous>)
    at load (/usr/local/lib/node_modules/nativescript/node_modules/signal-exit/index.js:156:23)
    at module.exports (/usr/local/lib/node_modules/nativescript/node_modules/signal-exit/index.js:62:7)
    at Object.<anonymous> (/usr/local/lib/node_modules/nativescript/node_modules/proper-lockfile/lib/lockfile.js:331:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)