The difference lies in the fact that ./gradlew indicates you are using a gradle wrapper. The wrapper is generally part of a project and it facilitates installation of gradle. If you were using gradle without the wrapper you would have to manually install it - for example, on a mac brew install gradle and then invoke gradle using the gradle command. In both cases you are using gradle, but the ...
Gradle is a bit confusing to me, and also for any new Android developer. Can anyone explain what Gradle in Android Studio is and what its purpose is? Why is it included in Android Studio?
That should force Gradle to "download" the package from your filesystem and set it up as it expects, while leaving other machines ok when you commit the gradle directory to your VCS.
If you are using a recent version of Gradle, you can use --refresh-dependencies option. ./gradlew build --refresh-dependencies you can refer to the Gradle manual. The --refresh-dependencies option tells Gradle to ignore all cached entries for resolved modules and artifacts. A fresh resolve will be performed against all configured repositories, with dynamic versions recalculated, modules ...
2 I fixed this by running a clean of by gradle build (or delete the gradle build folder mannually) This occurs if you move the main class to a new package and the old main class is still referenced in the claspath
I want to execute gradle build without executing the unit tests. I tried: gradle -Dskip.tests build That doesn't seem to do anything. Is there some other command I could use?
The release notes say: With this release, Gradle now fully supports compiling, testing and running on Java 21. If migrating from older Gradle, see What's new in Gradle 8.0. Gradle and its dependencies Groovy & Kotlin all tend to run months behind Java. If you need to use the latest Java in your work, use Maven instead of Gradle.
Gradle 6.7+ — Use Gradle Toolchain Support The right way to do this with modern versions of Gradle (version 6.7+) is to use the Gradle Java Toolchain support.
So you have the blue boxes compileClasspath and runtimeClassPath. The compileClasspath is what is required to make a successful build when running gradle build. The libraries that will be present on the classpath when compiling will be all libraries that are configured in your gradle build using either compileOnly or implementation.