I am new to IJ IDEA and Gradle KTS.
I created the kts by hand and imported it into IJ. IDEA has generated the gradle wrapper, but I do not want this. If I delete the gradle wrapper and associated directory, IDEA prompts me to 'import changes' from gradle, which then creates the gradle wrapper again...
My question is how to prevent this behavior? ie prevent gradle wrapper generation?
I found documentation for the Wrapper task, and the option to point to a local install using distributionUrl. But that doesnt seem to prevent the generation of the gradle wrapper, only bypass the download...
Also I can not find any options in IDEA to disable this behavior.
btw I do understand the benefits of the wrapper.
Thanks.
IntelliJ IDEA EAP 2019.2 macOS 10.12.4 gradle 5.2.1 kotlin DSL 1.1.3
Note that it requires you to have gradlew executable in the project directory (it's there by default when using Android Studio). After the installation you can find "Gradle Stop" button on Main Toolbar and inside Run Menu.
To build a Gradle-based project, we need to have Gradle installed in our machine. However, if our installed version doesn't match with the project's version, we'll probably face many incompatibility problems. Gradle Wrapper, also called Wrapper in short, solves this problem.
Disabling access to the download directory seems to work:
mkdir -p ~/.gradle/wrapper/dists && chmod -rwx ~/.gradle/wrapper/dists
Note that this prevents the wrapper to work at all (which is exactly what I want) and causes error messages, but as far as I can see it does the job and the project simply has to be configured to use the system gradle distribution after import.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With