Simon Mavi Stewart
08/20/2024, 6:02 PMModelBuilder, and using sysout debugging isn’t really working well for me.Vampire
08/20/2024, 7:52 PMSimon Mavi Stewart
08/21/2024, 10:06 AM-Dorg.gradle.debug=true to modelBuilder.withArguments, but the daemon process definitely doesn’t stop and wait for a debugger.Simon Mavi Stewart
08/21/2024, 10:08 AM--no-daemon causes an exception stating that --daemon is an unsupported build option.Vampire
08/21/2024, 3:46 PMGradleConnector
.newConnector()
.forProjectDirectory(file("."))
.connect()
.use {
it
.newBuild()
.withArguments("-Dorg.gradle.debug=true")
.run()
}
stops and waits for a debugger to get attached unless other options are used like org.gradle.debug.server = false in the user-level gradle.properties.Vampire
08/21/2024, 3:49 PMinterface Foo
GradleConnector
.newConnector()
.forProjectDirectory(file("."))
.connect()
.use {
it
.model(Foo::class.java)
.withArguments("-Dorg.gradle.debug=true")
.get()
}
works fine and as expected.Simon Mavi Stewart
08/21/2024, 3:51 PMVampire
08/21/2024, 3:52 PMorg.gradle.debug.server = false it would fail if no debugger listens, I guess you have org.gradle.debug.suspend = false somewhere as that would then behave as you describe. It would listen for a debugger but not waitVampire
08/21/2024, 3:54 PMSimon Mavi Stewart
08/21/2024, 4:41 PMProjectConnection connection = connector.connect();
OutgoingArtifactsModel model = connection.model(OutgoingArtifactsModel.class)
.withArguments("-Dorg.gradle.debug=true", "--init-script", copyInitScript().getAbsolutePath())
.get();
isn’t working for me with 7.6.4.Vampire
08/21/2024, 4:43 PMorg.gradle.debug.suspend = false somewhere. Maybe try to explicitly supply it in that call as -Dorg.gradle.debug.suspend=true?Vampire
08/21/2024, 4:44 PMSimon Mavi Stewart
08/21/2024, 4:44 PMSimon Mavi Stewart
08/21/2024, 4:44 PMSimon Mavi Stewart
08/21/2024, 4:45 PMVampire
08/21/2024, 5:54 PMSimon Mavi Stewart
08/22/2024, 9:37 AMbazel, so you’ll to have that available.
I’d recommend installing bazelisk and renaming the binary bazel (you can think of bazelisk as the equivalent of gradlew, in that it allows a build to pin the version of bazel it’s using) I set the arguments to pass to the model here.
Once you’ve got that, you can run everything using bazel run private/tools/java/com/github/bazelbuild/rules_jvm_external/resolver/cmd:Resolver -- --resolver gradle 'com.google.guava:guava:33.2.1-jre'Simon Mavi Stewart
08/22/2024, 9:41 AMRJE_DEBUG=1 we should hit the debugger.Vampire
08/22/2024, 11:01 AMSimon Mavi Stewart
08/22/2024, 11:08 AMSimon Mavi Stewart
08/22/2024, 11:08 AM