Slackbot
01/12/2024, 1:01 PMVampire
01/12/2024, 1:09 PM./gradlew classes --continuous, then Gradle will stay running and rerun the build as soon as relevant input file was chagned.Fuyang Liu
01/12/2024, 1:16 PMFuyang Liu
01/12/2024, 1:19 PM./gradlew classes --continous
Calculating task graph as no cached configuration is available for tasks: classes --continous
FAILURE: Build failed with an exception.
* What went wrong:
Problem configuring task :sub-project-1:classes from command line.
> Unknown command-line option '--continous'.Fuyang Liu
01/12/2024, 1:20 PMFuyang Liu
01/12/2024, 1:26 PM./gradlew :application:classes but adding --continous failed as above.Fuyang Liu
01/12/2024, 1:33 PM-t also works, and when I tried with ./gradlew :application:classes -t it output such:
./gradlew :application:classes -t
Reusing configuration cache.
BUILD SUCCESSFUL in 2s
29 actionable tasks: 29 up-to-date
Configuration cache entry reused.
Waiting for changes to input files... (ctrl-d then enter to exit)
<-------------> 0% WAITING
> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
However, changing a java file in IntelliJ has no effect, looking at the .class files it stays with the old one. Nothing new output on the gradlew command either... 🤔Fuyang Liu
01/12/2024, 1:39 PM--continuous I missed a u above...Vampire
01/12/2024, 1:40 PMFuyang Liu
01/12/2024, 1:41 PMVampire
01/12/2024, 1:41 PM-t is the same, just a short formVampire
01/12/2024, 1:41 PMVampire
01/12/2024, 1:41 PMFuyang Liu
01/12/2024, 1:41 PMVampire
01/12/2024, 1:42 PMVampire
01/12/2024, 1:42 PMVampire
01/12/2024, 1:42 PMFuyang Liu
01/12/2024, 1:43 PMVampire
01/12/2024, 1:43 PMFuyang Liu
01/12/2024, 1:44 PMBUILD SUCCESSFUL in 4s
29 actionable tasks: 1 executed, 28 up-to-date
Configuration cache entry reused.
Waiting for changes to input files... (ctrl-d then enter to exit)
<-------------> 0% WAITING
> IDLE
> IDLE
> IDLE
The first time running it built stuff, and out put these, then it just stay there no matter what I change... could it be I am on windows and gradle is trigged via git bash?Vampire
01/12/2024, 1:45 PMVampire
01/12/2024, 1:45 PMFuyang Liu
01/12/2024, 1:46 PMorg.gradle.jvmargs=-Xmx8096m
org.gradle.parallel=true
org.gradle.configuration-cache=trueFuyang Liu
01/12/2024, 1:46 PMVampire
01/12/2024, 1:46 PMVampire
01/12/2024, 1:47 PMVampire
01/12/2024, 1:47 PMVampire
01/12/2024, 1:49 PM$ gw classes --continuous
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Calculating task graph as no cached configuration is available for tasks: classes
Type-safe project accessors is an incubating feature.
> Task :processResources
> Task :compileJava
> Task :classes
BUILD SUCCESSFUL in 46s
2 actionable tasks: 2 executed
Configuration cache entry stored.
Waiting for changes to input files... (ctrl-d then enter to exit)
modified: D:\Sourcecode\other\showcase\src\main\java\foo\Foo.java
Change detected, executing build...
Reusing configuration cache.
> Task :processResources UP-TO-DATE
> Task :compileJava
> Task :classes
BUILD SUCCESSFUL in 860ms
2 actionable tasks: 1 executed, 1 up-to-date
Configuration cache entry reused.
Waiting for changes to input files... (ctrl-d then enter to exit)
modified: D:\Sourcecode\other\showcase\src\main\java\foo\Foo.java
Change detected, executing build...
<=============> 100% EXECUTING [42s]
> IDLE
> IDLE
Also run through git bash on windowsFuyang Liu
01/12/2024, 1:51 PMVampire
01/12/2024, 1:53 PMclasses and changed a test class, it will not rerun as only the production classes got compiled.Vampire
01/12/2024, 1:58 PMFuyang Liu
01/12/2024, 1:59 PMFuyang Liu
01/12/2024, 2:00 PMVampire
01/12/2024, 2:00 PMFuyang Liu
01/12/2024, 2:09 PM- java
|--lib1
|--build.gradle.kts
|--application
|--build.gradle.kts
- build-logic
|-- settings.gradle.kts
|-- build.gradle.kts
- workspace
|-- gradle(has gradlew jars and so on)
|-- gradlew
|-- settings.gradle.kts
so in my settings.gradle.kts I have:
pluginManagement {
repositories {
gradlePluginPortal()
}
includeBuild("../build-logic")
}
file("../java").listFiles()
?.filter { it.isDirectory && !it.isHidden && !it.name.startsWith(".") && !ignoredSubFolders.contains(it.name) }
?.forEach {
include(":it.name")
project(":it.name").projectDir = file("../java/${it.name}")
}Fuyang Liu
01/12/2024, 2:15 PMjava folder is under svn, so all my colleagues are using eclipse to work with it.
And I thought before I could check in all the gradle related stuff (as I am the only one using this tool), I sort of want to keep it outside of the version control system. Also would like to make it easier later someone else also want to try with a gradle build, they can just copy build-logic and workspace - and put those two folders besides their `java`folder, then they could build it.
But now when I run the gradlew classes -t command, I run it under `workspace`folder, perhaps that is why the continue build feature is not working any more.Fuyang Liu
01/12/2024, 2:19 PMworkspace to one level above it. Not sure if it will have other said effects. For now it could be that my colleagues needs to copy 6 or 7 files and put them beside java and mingle with other files on that level... A bit messy but still doable I guess. 🤔Vampire
01/12/2024, 2:21 PMFuyang Liu
01/12/2024, 2:22 PMVampire
01/12/2024, 2:25 PMVampire
01/12/2024, 2:26 PM$ mkdir -p ../java/foo
$ cp -r src/ build.gradle.kts ../java/foo/
$ gw foo:classes --continuous
and it does not detect the changesVampire
01/12/2024, 2:27 PMVampire
01/12/2024, 2:30 PMFuyang Liu
01/12/2024, 2:33 PMVampire
01/12/2024, 2:34 PMVampire
01/12/2024, 2:34 PMFuyang Liu
01/12/2024, 3:27 PM