android-dts-generator
android-dts-generator copied to clipboard
./gradlew jar not working
Wanted to clone this to geenrate typings for my own Android library (to be used in a NativeScript plugin) Steps to reproduce
git clone https://github.com/NativeScript/android-dts-generator.git
cd android-dts-generator
cd dts-generator/
./gradlew jar
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/adriann/Developer/android-dts-generator/dts-generator/build.gradle' line: 14
* What went wrong:
A problem occurred evaluating root project 'dts-generator'.
> /Users/adriann/Developer/android-dts-generator/dts-generator/gradle.properties (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 483ms
It seems gradle.properties is missing.
same issue, here
Hi, I faced the same issue. I've solved it by manually adding the gradle.properties file with the variables that are supposed to be there:
ns_default_bcel_version=6.5.0
ns_default_commons_io_version=2.8.0
ns_default_spotbugs_version=3.1.12
If you don't want to add the file, another option is to remove the code that looks for the gradle.properties file and directly add these variables in the build.gradle:
project.ext.ns_default_bcel_version = "6.5.0"
project.ext.ns_default_commons_io_version = "2.8.0"
project.ext.ns_default_spotbugs_version = "3.1.12"
For the version codes I used the ones that were being used before the variables were introduced here https://github.com/NativeScript/android-dts-generator/commit/dd5d0dcd47170288653b475ad5d236552adb1bdc. I don't know if it is supposed to use newer versions.
One can generate a NativeScript app via
ns create testApp --ts; cd testApp; npm install @nativescript/android --save-dev; ns build android
Then, you can copy testApp/platforms/android/gradle.properties into the dts-generator directory of this repo.