Slackbot
06/09/2021, 3:33 PMSlackbot
06/21/2021, 10:42 AMSlackbot
06/24/2021, 9:03 AMSlackbot
06/28/2021, 4:24 PMSlackbot
07/06/2021, 11:53 AMSlackbot
07/07/2021, 10:21 AMSlackbot
07/20/2021, 6:46 PMSlackbot
08/13/2021, 4:26 PMSlackbot
08/30/2021, 7:44 AMSlackbot
09/20/2021, 11:52 AMSlackbot
10/18/2021, 3:36 PMSlackbot
11/15/2021, 7:03 PMSlackbot
11/27/2021, 12:06 AMSlackbot
11/30/2021, 12:23 PMSlackbot
12/10/2021, 10:18 AMSlackbot
12/12/2021, 8:30 PMSlackbot
01/03/2022, 2:40 PMSlackbot
01/11/2022, 1:42 PMSlackbot
01/20/2022, 7:53 PMSlackbot
01/26/2022, 2:51 PMmelix
04/29/2022, 11:33 AMGiuseppe Barbieri
01/27/2025, 10:47 AMcatalog
is a simple module, while platform
is a build, which imports catalog/build/version-catalog/libs.versions.toml
Everything works fine, except I have an egg-chicken problem: when I start from scratch (ie: clone), I have to disable first platform
so that catalog:generateCatalogAsToml
can have the chance to first generate the toml file which then platform
can consume, after I enable it again
Is there a solution which wouldn't involve splitting catalog
and platform
?Giuseppe Barbieri
01/28/2025, 9:21 AMtasks.withType(Jar).configureEach {
manifest {
attributes["Main-Class"] = mainClassName
}
}
While on the binary Kotlin plugin counterpart, I have to resort to doFirst/Last
, which makes sense
project.tasks.withType<Jar>().configureEach {
doFirst {
manifest {
project.application {
attributes["Main-Class"] = mainClass.get()
}
}
}
}
Leon Linhart
01/29/2025, 4:56 PMStackOverflowException
caused by file collections that I don't fully understand. Basically, I have a project extension that configures an implementation of SourceTask
. My initial approach was using a ConfigurableFileCollection
in the extension and passing it to the task via SourceTask#source(Object...)
. However, when I try to add sources to the collection (via ``ConfigurableFileCollection#from(Object...)``; e.g. from("./test.txt")
) I get a SOE but only if the file exists. Am I missing something obvious here? (A few more details in 🧵)Kelvin Chung
01/30/2025, 6:37 AMabstract class AbstractDatabaseTask : DefaultTask() {
@get:Classpath
abstract val driverClasspath: ConfigurableFileCollection
@get:Input
abstract val driverClassName: Property<String>
// Derived from driverClasspath
private val driverClassLoader: Provider<URLClassLoader> = ...
// Derived from driverClasspath and driverClassName
private val driverClass: Provider<Class<out Driver>> = ...
// Invoke DriverManager.registerDriver() here with a driver created from driverClass
private fun loadDriver(): Driver { ... }
protected fun <T> runWithDriver(fn: () -> T): T {
val driver = loadDriver()
try {
return fn()
} finally {
DriverManager.deregisterDriver(driver)
}
}
}
The intent here is that you would eventually be able to operate with JDBC in this task. I'm wondering if this is a good use case for, say, a BuildService
that could centralize some of this logic, or if there are complications that would necessitate every task to have its own driver classloader.efemoney
01/30/2025, 11:20 PMNotationParser
to parse to AType, I want to support say;
• MyType
• String
• Provider<> of above
• ProviderConvertible<> of above
Is it possible to use the NotationConverter I registered for String while implementing the for example the Provider<> converter?
So far it seems one would need to duplicate the logic inside of Provider & ProviderConvertible converters?Adam
02/01/2025, 7:40 PMysb33r
02/07/2025, 8:47 PM// Pseudo code
class MyExtension {
Property<Content> someContent // Content can any type one wishes
}
class TaskFromOtherPlugin {
@OutputFile
Provider<File> getOutputFile() { ... }
}
projext.extensions.getByType(MyExtension).someContent.set(
project.tasks.named('otherTask',TaskFromOtherPlugin).flatMap {
final file = it.outputFile
// process file and return and instance of Content
}
)
If for some reason, someContent
is evaluated in configuration phase it will proably fail, which is the correct behaviour.
However, during execution phase, it should invoke the task when the Property is evaluated. I am not actually sure, it will invoke the task at the correct time.
Any suggestions?ysb33r
02/13/2025, 12:10 PMtfPlan
, tfApply
etc. (for the default source set) and if you have source set called foo
then tfFooPlan
, tfFooApply
. If you have additional workspaces within a sourceset i.e. staging
and prod
then you also have tasks like tfPlanStaging
, tfApplyStaging
, tfApplyProd
, tfPlanProd
etc. (there is a pattern here).
The real question now is, how to run these in parallel?
There are limitations:
• we cannot run any tasks within the same source set in parallel and not even if they are from different workspaces (this is a limitation on how the tool works)
• if one source set is somehow dependent on another source set, then we cannot run the tasks of those source sets in parallel (they should be in a mustRunAfter relationship). But let's just assume that will define a way that the source set relationship can be explicitly stated.
These are external tools, thus invoked via ExecSpec
and there are no classpaths involved. It does not really make sense to use workers, because they are more suited towards JVM processes.
Is there a way in Gradle, to define that tasks can be run in parallel, but certain groups of tasks cannot run in parallel with other tasks in the same grouping? IOW the two groupings can run in parallel.no
02/14/2025, 3:58 PMincludeBuild(...)
I get the non-shadowed version.
My setup is quite minimal. I have configured the shadowJar task to have
archiveClassifier = ''
Anything else i should reconfigure here to get this working with included builds?