Slackbot
10/29/2022, 5:41 PMCristianGM
10/30/2022, 2:24 PMephemient
10/31/2022, 1:26 AMephemient
10/31/2022, 1:27 AMXavier Ducrohet
10/31/2022, 2:07 AMgradlew
or gradle-wrapper.jar
because it includes Gradle's Tooling API which is a Jar that basically does the same thing. That allows the IDE to directly start the Gradle daemon and connect to it without starting another JVM just to run gradle-wrapper
.Xavier Ducrohet
10/31/2022, 2:08 AMgradlew
and gradle-wrapper.jar
are only used from the command line. The IDE only uses the content of gradle-wrapper.properties
Vinay Potluri
11/01/2022, 8:28 PMephemient
11/01/2022, 8:36 PMephemient
11/01/2022, 8:41 PMsonot totally true, the IDE launchesandgradlew
are only used from the command line. The IDE only uses the content ofgradle-wrapper.jar
gradle-wrapper.properties
gradlew
directly as well. https://android-developers.googleblog.com/2022/01/android-studio-bumblebee-202111-stable.html
we’ve introduced a new test runner to Android Gradle plugin (AGP) 7.1.0 that Android Studio Bumblebee uses by default when running instrumentation tests, so all your tests run through a unified test runner. This is a similar improvement to Android Studio Arctic Fox, where we started running all unit tests via Gradle by default.
ansh sachdeva
11/06/2022, 6:10 PMgradle-wrapper.jar
by ourselves, like java -jar gradle-wrapper.jar build
? what is the exact use of gradlew
/`gradlew.bat`?
@Xavier Ducrohet I have a related question to this. why does AndroidStudio gives warning like build path and jdk path are different, and will result in spawning multiple JVMs? at the OS level, i can assume that if i have a jar named print-hello-world.jar
and print-bye-world.jar
each of size 1mb, then when i run the both of these jar, they will be take 1.001 gb of RAM memory while their process is executing( i.e 1gb of JVM(assumption)+ 1mb of jar file), and that can't be avoided, right? or could it be? is AS telling a warning that it can somehow share the common jvm in multiple processes?ansh sachdeva
11/06/2022, 6:12 PMephemient
11/07/2022, 1:32 AMgradle-wrapper.jar
yourself, the gradlew
script is there to help set up the environment for itephemient
11/07/2022, 1:33 AMgradle-wrapper.jar
isn't what's doing most of the work: its job is to download and cache the gradle distribution if needed, launch the gradle daemon if needed, and forward the build commands to the daemon / forward the output from the daemon to your consoleephemient
11/07/2022, 1:34 AMXavier Ducrohet
11/11/2022, 6:20 PMnot totally true, the IDE launchesThat's not correct. All IDE actions that call into Gradle use Gradle's tooling API which does not usedirectly as well.gradlew
gradlew
Xavier Ducrohet
11/11/2022, 6:23 PMwhy does AndroidStudio gives warning like build path and jdk path are differentWhen Studio calls into Gradle using the Tooling API, it specify which JRE/JDK to use to run Gradle. By default it'll use the one embedded into Studio (which Studio uses to run itself). When running from the command line,
gradlew
will use whatever JDK path is set as default in your env properties.
If they are different it means that starting build from the IDE and the command line will use different JDK and therefore the daemon started by one cannot be reused by the second one. daemon have a idle timeout of 3 hour, so they'll linger for that long after the last build before they die.ephemient
11/11/2022, 6:30 PMXavier Ducrohet
11/12/2022, 1:05 AMgradle-core
module which is the AGP plugin, not the IDE.Xavier Ducrohet
11/12/2022, 1:09 AMadb
but I just commented it out (IJ wouldn't show me any usage) and it is indeed unused!ephemient
11/12/2022, 1:59 AM