ganachoco
01/06/2023, 2:54 AMtaskGraph.afterTask
to get failed task list when build is failed like this.
gradle.taskGraph.afterTask {
if (state.failure != null) {
println("failed task: ${project.path}:$name\n")
}
}
}
But taskGraph.afterTask
is deprecated and will be removed soon.
How I can get failed task without calling taskGraph.afterTask
?Jiří Grygerek
01/06/2023, 5:47 PMJiří Grygerek
01/06/2023, 5:47 PMgradle
task release() {
dependsOn(shadowJar, build)
[
'A:/workspaces/plugins'
]
.each {destination -> copy {
try {
from jar
into destination
} catch (e) {
e.printStackTrace()
}
}}
}
V
6:36:12 PM: Executing 'release'...
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :assemble UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE
> Task :relocateShadowJar
> Task :shadowJar UP-TO-DATE
> Task :release UP-TO-DATE
BUILD SUCCESSFUL in 109ms
5 actionable tasks: 1 executed, 4 up-to-date
6:36:13 PM: Execution finished 'release'.
everything looks like it was successful but the file is not being copied to that folder, does anyone know?KUMAR SATYAM
01/06/2023, 6:01 PMDhruv Sharma
01/07/2023, 2:48 PMDhruv Sharma
01/07/2023, 2:49 PMJavi
01/07/2023, 2:59 PMJavi
01/07/2023, 3:37 PMinternal inline fun <reified T> Project.property(noinline block: Project.() -> T): Property<T> =
objects.property<T>().convention(project.provider { block(this) })
But I am getting a crash
inline fun property(): compile avoidance is not supported with public inline functions
This is only happening with Gradle TestKit. Testing it in included builds doesn't crash.
Is there any workaround?Robert Elliot
01/08/2023, 9:14 AMJavi
01/08/2023, 2:53 PMallTests
even for not Kotlin Multiplatform projects and it will depends on withType<Test>()
. But when I run allTests
with IntelliJ, I can't see all tests tree (passed/failed/ignored) as I can see when I run test
. I have to register allTests
with a specific type to get the tree?Philip W
01/09/2023, 11:26 AMNativeBinary.linkerOpts
of the KotlinTarget is a mutableList<String> and I have a ListProvider<String>. Only hack I have in mind is using afterEvaluate to get the value of the provider lazily.AG
01/09/2023, 5:08 PMbuild-logic-settings
included build in my pluginManagement
block and I have a convention plugin to configure the build cache inside the project. As I understand from the docs
This configuration precedence does not apply to plugin builds included through pluginManagement as these are loaded before the cache configuration itself.
my plugin won't work in build-logic-settings
, so as a workaround I've applied that plugin directly in build-logic-settings
apply(from = "cache-plugin/src/main/kotlin/convention-cache.settings.gradle.kts")
but after generating a build scan it says that
The build cache configuration of the root build differs from the build cache configuration of the early evaluated ':build-logic-settings' included build
so what's the right way to have the same build cache config?Dariusz Kuc
01/09/2023, 6:30 PM/build.gradle.kts <--- root build for libraries
/gradlew <-- wrapper for libs
/libA
/libB
/libC
/examples
/build.gradle.kts <-- root build for examples, includes libraries
/gradlew <-- wrapper for examples
/exampleA
/exampleB
/integration
/testA
/build.gradle.kts <-- integration test build, includes libraries
/gradlew <-- wrapper for integration test
Just wondering -> should I drop those multiple wrappers in favor of just using the root (lib) one? Currently you can run wrapper from root or from composite builds which I guess is pretty nice but not a big fan of having multiple gradle distributions in single repo.Jiří Grygerek
01/09/2023, 8:00 PM> Task :generateRestApiDocs FAILED
javadoc: error - Cannot find doclet class com.lunatech.doclets.jax.jaxrs.JAXRSDoclet
Execution failed for task ':generateRestApiDocs'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): 'A:\Projects\coffeeLibs\build\tmp\generateRestApiDocs\javadoc.options'
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':generateRestApiDocs'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:142)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:140)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:128)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:69)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:327)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:314)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:307)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:293)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:420)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:342)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
Alessandro Parisi
01/10/2023, 9:22 AMJavi
01/10/2023, 11:13 AMKotlinSourceSet
and so on are not depending on SourceSet
?Jiří Grygerek
01/10/2023, 12:25 PM.env
file, everything works normally in the debugger, but the moment you insert the jar on the external server, it says that no similar key was found. and what's worse, sometimes the entire DotEnv is missing.Javi
01/10/2023, 1:02 PMtest
, integrationTest
and functionalTest
). Additionally I want to add that concept in a general way to any Kotlin project, not only Gradle plugins.
That implies adding it to Kotlin Multiplatform projects. KMP is using allTests
for running everything.
I could do that allTests
depends on allTest
allIntegrationTest
and allFunctionalTest
. What do you think?
More info in 🧵Daan
01/10/2023, 1:38 PMsubprojects {}
and allprojects {}
is bad because of cross project configuration, but what about dependencies { implementation subprojects }
?Sebastian Schuberth
01/10/2023, 3:08 PMlibs.plugins
(as defined in libs.versions.toml
) also from settings.gradle.kts
, to apply build (not project) plugins?Matthew Von-Maszewski
01/10/2023, 4:33 PMimplementation "org.boost:boost_program_options:1.67.0" + Platform
I need to know the path were gradle places this library. Need the path for some special linker parameters. Any hints on how to obtain the path?Joseph McCay
01/10/2023, 10:39 PMplugins {
id "com.gradle.plugin-publish" version "0.20.0"
}
pluginBundle {
website = '<https://github.com/i-net-software/JWebAssembly-Gradle>'
vcsUrl = '<https://github.com/i-net-software/JWebAssembly-Gradle>'
description = 'A Gradle plugin for the JWebAssembly compiler. A Java bytecode to WebAssembly converter. It produce the WASM and JavaScript file from your *.java, *.class and/or *.jar files.'
tags = ['jwebassembly', 'webassembly', 'wasm', 'java', 'bytecode', 'compile', 'converter', 'transpiler' ]
plugins {
jwebassemblerPlugin {
id = 'de.inetsoftware.jwebassembly'
displayName = 'Gradle JWebAssembly plugin'
tags = ['jwebassembly', 'webassembly', 'wasm', 'java', 'bytecode', 'compile', 'converter', 'transpiler' ]
}
}
mavenCoordinates {
artifactId = archivesBaseName
}
}
Joseph McCay
01/10/2023, 10:55 PMplugins {
id "com.gradle.plugin-publish" version "0.20.0"
}
pluginBundle {
website = '<https://github.com/i-net-software/JWebAssembly-Gradle>'
vcsUrl = '<https://github.com/i-net-software/JWebAssembly-Gradle>'
description = 'A Gradle plugin for the JWebAssembly compiler. A Java bytecode to WebAssembly converter. It produce the WASM and JavaScript file from your *.java, *.class and/or *.jar files.'
tags = ['jwebassembly', 'webassembly', 'wasm', 'java', 'bytecode', 'compile', 'converter', 'transpiler' ]
plugins {
jwebassemblerPlugin {
id = 'de.inetsoftware.jwebassembly'
displayName = 'Gradle JWebAssembly plugin'
tags = ['jwebassembly', 'webassembly', 'wasm', 'java', 'bytecode', 'compile', 'converter', 'transpiler' ]
}
}
mavenCoordinates {
artifactId = archivesBaseName
}
}
I tried to replace that with the following:
plugins {
// id "com.gradle.plugin-publish" version "0.21.0"
id 'com.gradle.plugin-publish' version '1.0.0'
}
gradlePlugin {
website = '<https://github.com/i-net-software/JWebAssembly-Gradle>'
vcsUrl = '<https://github.com/i-net-software/JWebAssembly-Gradle>'
description = 'A Gradle plugin for the JWebAssembly compiler. A Java bytecode to WebAssembly converter. It produce the WASM and JavaScript file from your *.java, *.class and/or *.jar files.'
// tags = ['jwebassembly', 'webassembly', 'wasm', 'java', 'bytecode', 'compile', 'converter', 'transpiler' ]
plugins {
jwebassemblerPlugin {
id = 'de.inetsoftware.jwebassembly'
displayName = 'Gradle JWebAssembly plugin'
tags = ['jwebassembly', 'webassembly', 'wasm', 'java', 'bytecode', 'compile', 'converter', 'transpiler' ]
}
}
mavenCoordinates {
artifactId = archivesBaseName
}
}
I am now getting the error:
A problem occurred evaluating root project ‘JWebAssembly-Gradle’.
Could not set unknown property ‘website’ for extension ‘gradlePlugin’ of type org.gradle.plugin.devel.GradlePluginDevelopmentExtension.I have search the code, but I can’t find where it is implemented. I also can’t find anything on the pluginBundle.website property, or how it applies to the gradlePlugin and a possible website property. I don’t plan on publishing this for general use. How can I fix this issue? Thank you for the help in advance.
Jacob Kim
01/11/2023, 1:47 AMJacob Kim
01/11/2023, 3:30 AMPhilip W
01/11/2023, 11:55 AMArimil
01/11/2023, 12:58 PMbuildSrc/settings.gradle.kts
is not sufficient.SomeCat
01/11/2023, 1:11 PMEli Graber
01/12/2023, 1:19 AMRootProjectAccessor
? I know I could use subprojects
but I've been trying to avoid using it in preparation for project isolation.Slackbot
01/12/2023, 5:43 AM