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

./gradlew jar not working #69

Open
adrian-niculescu opened this issue Mar 9, 2022 · 3 comments
Open

./gradlew jar not working #69

adrian-niculescu opened this issue Mar 9, 2022 · 3 comments

Comments

@adrian-niculescu
Copy link

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.

@vfrancov
Copy link

vfrancov commented Apr 7, 2022

same issue, here

@matey97
Copy link

matey97 commented May 2, 2022

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 dd5d0dc. I don't know if it is supposed to use newer versions.

@adrian-niculescu
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants