Colton Idle
10/23/2025, 9:43 PMVlastimil Brecka
10/24/2025, 12:12 AMsubprojects {
tasks.register("foo") { … }
}
ELI5 why does this break configuration avoidance? It's using register which makes task instantiation lazy.. so what's the problem?
Docs basically just say its bad because it injects code not visible at project build file (sure), and it introduces comfiguration time coupling (not sure what does it mean)
How exactly am I tanking perf by this?Slackbot
10/24/2025, 2:10 PMBen Bader
10/24/2025, 3:52 PMdef myExtensionOutput = extensions.getByName("myExtension").outputFilePath
tasks.register("someTask") {
inputs.file(myExtensionOutput)
}
The reason they do this is because the file at the output path is expected to just be there as a result of a previous task execution. There is no implied dependency on the source task in the graph.
My question is, is this wrong? Why? It feels wrong to me but I can't think of any actual problem they'd encounter and I'd like to check my assumptions. (clearly the better solution is to pass the path in as a property/env-var/well-known-file, and that's what I've recommended)Colton Idle
10/24/2025, 7:14 PMimplementation is automatically also available in androidTestImplementation right?
Same goes for unit tests. So you don't have to redefine every dep to be implementation and testImplementation right?Vlastimil Brecka
10/24/2025, 7:43 PMsettings.gradle
But isn't there something more sophisticated?
Other than flipping it on its head, having per app builds & then one composite one (which I would not prefer)Colton Idle
10/26/2025, 5:31 AMcache github action and trying to cache certain downloads from gradle there.
i have 0 experience setting up github actions with a gradle+android project (i usually use bitrise) so im unsure if this sort of caching thing is just handled for free when using the official gradle step. thanks!Robert Elliot
10/26/2025, 11:48 AMcom.github.johnrengelman.shadow:8.1.1 to com.gradleup.shadow:9.2.2, and it breaks some of my existing gradle config. Details in thread.Colton Idle
10/26/2025, 7:57 PMPhilipp Nowak
10/27/2025, 7:34 AMisIncludeAndroidResources = false and failOnNoDiscoveredTests = false do not seem to work, I still get the same error
There are test sources present and no filters are applied, but the test task did not discover any tests to execute. This is likely due to a misconfiguration. Please check your test configuration. If this is not a misconfiguration, this error can be disabled by setting the 'failOnNoDiscoveredTests' property to false.
Upgrading AGP to an alpha 9.x is no option for us atm. Did anyone solve this problem?Rahul Srivastava
10/27/2025, 7:57 AM[ERROR] Failed to execute goal org.thingsboard:gradle-maven-plugin:1.0.12:invoke (default) on project edqs: org.gradle.tooling.BuildException: Could not execute build using connection to Gradle distribution '<https://services.gradle.org/distributions/gradle-7.3.3-bin.zip>'. -> [Help 1]
while looking deeper in the issue i got that it is not able to build the gradle.build file my gradle.buuld file looks like this
/**
* Copyright © 2016-2025 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* <http://www.apache.org/licenses/LICENSE-2.0>
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id "nebula.ospackage" version "8.6.3"
}
buildDir = projectBuildDir
version = projectVersion
distsDirName = "./"
// OS Package plugin configuration
ospackage {
packageName = pkgName
version = "${project.version}"
release = 1
os = LINUX
type = BINARY
into pkgInstallFolder
user pkgUser
permissionGroup pkgUser
// Copy the actual .jar file
from(mainJar) {
// Strip the version from the jar filename
rename { String fileName ->
"${pkgName}.jar"
}
fileMode 0500
into "bin"
}
if("${pkgCopyInstallScripts}".equalsIgnoreCase("true")) {
// Copy the install files
from("${buildDir}/bin/install/install.sh") {
fileMode 0775
into "bin/install"
}
from("${buildDir}/bin/install/upgrade.sh") {
fileMode 0775
into "bin/install"
}
from("${buildDir}/bin/install/logback.xml") {
into "bin/install"
}
}
// Copy the config files
from("${buildDir}/conf") {
exclude "${pkgName}.conf"
fileType CONFIG | NOREPLACE
fileMode 0754
into "conf"
}
// Copy the data files
from("${buildDir}/data") {
fileType CONFIG | NOREPLACE
fileMode 0754
into "data"
}
// Copy the extensions files
from("${buildDir}/extensions") {
into "extensions"
}
}
// Configure our RPM build task
buildRpm {
arch = NOARCH
archiveVersion = projectVersion.replace('-', '')
archiveFileName = "${pkgName}.rpm"
requires("(java-17 or java-17-headless or jre-17 or jre-17-headless)") // .or() notation does work in RPM plugin
from("${buildDir}/conf") {
include "${pkgName}.conf"
filter(ReplaceTokens, tokens: ['pkg.platform': 'rpm'])
fileType CONFIG | NOREPLACE
fileMode 0754
into "${pkgInstallFolder}/conf"
}
preInstall file("${buildDir}/control/rpm/preinst")
postInstall file("${buildDir}/control/rpm/postinst")
preUninstall file("${buildDir}/control/rpm/prerm")
postUninstall file("${buildDir}/control/rpm/postrm")
user pkgUser
permissionGroup pkgUser
// Copy the system unit files
from("${buildDir}/control/template.service") {
addParentDirs = false
fileMode 0644
into "/usr/lib/systemd/system"
rename { String filename ->
"${pkgName}.service"
}
}
link("${pkgInstallFolder}/bin/${pkgName}.yml", "${pkgInstallFolder}/conf/${pkgName}.yml")
link("/etc/${pkgName}/conf", "${pkgInstallFolder}/conf")
}
// Same as the buildRpm task
buildDeb {
arch = "all"
archiveFileName = "${pkgName}.deb"
requires("openjdk-17-jre").or("java17-runtime").or("oracle-java17-installer").or("openjdk-17-jre-headless")
from("${buildDir}/conf") {
include "${pkgName}.conf"
filter(ReplaceTokens, tokens: ['pkg.platform': 'deb'])
fileType CONFIG | NOREPLACE
fileMode 0754
into "${pkgInstallFolder}/conf"
}
configurationFile("${pkgInstallFolder}/conf/${pkgName}.conf")
configurationFile("${pkgInstallFolder}/conf/${pkgName}.yml")
configurationFile("${pkgInstallFolder}/conf/logback.xml")
configurationFile("${pkgInstallFolder}/conf/actor-system.conf")
preInstall file("${buildDir}/control/deb/preinst")
postInstall file("${buildDir}/control/deb/postinst")
preUninstall file("${buildDir}/control/deb/prerm")
postUninstall file("${buildDir}/control/deb/postrm")
user pkgUser
permissionGroup pkgUser
// Copy the system unit files
from("${buildDir}/control/template.service") {
addParentDirs = false
fileMode 0644
into "/lib/systemd/system"
rename { String filename ->
"${pkgName}.service"
}
}
link("${pkgInstallFolder}/bin/${pkgName}.yml", "${pkgInstallFolder}/conf/${pkgName}.yml")
link("/etc/${pkgName}/conf", "${pkgInstallFolder}/conf")
}Rahul Srivastava
10/27/2025, 7:58 AMPhilip W
10/27/2025, 12:51 PMAndy Damevin
10/28/2025, 9:02 AMAlbert ten Napel
10/28/2025, 2:12 PMsource = fileTree("$projectDir").matching {
include("$javaSourceDirName/**/*.java")
excludedJavaFiles.forEach { exclude(it) }
}
This results in many errors such as:
Cannot infer source root(s) for source `file 'C:\...\Blabla.java'`. Supported types are `File` (directories only), `DirectoryTree` and `SourceDirectorySet`.
This seems to disable incremental compilation. How can I fix this code snippet?Zeynep Ozdemir
10/28/2025, 10:25 PMFailed to apply plugin 'com.facebook.react.rootproject'.> A problem occurred configuring project ':app'. > [CXX1101] NDK at C:\Users\zeyne\AppData\Local\Android\Sdk\ndk\27.1.12297006 did not have a source.properties file * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to generate a Build Scan (Powered by Develocity).
Get more help at https://help.gradle.org.BUILD FAILED in 2s error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Bui ld file 'C:\cprg303\cprg303LabAssignments\android\build.gradle' line: 21 * What went wrong: A problem occurred evaluating root project 'cprg303LabAssignments'. > Failed to apply pl ugin 'com.facebook.react.rootproject'. > A problem occurred configuring project ':app'. > [CXX1101] NDK at C:\Users\zeyne\AppData\Local\Android\Sdk\ndk\27.1.12297006 did not have a source.properties file * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to generate a Build Scan (Powered by Develocity). > Get more help at https://help.gradle.org. BUILD FAILED in 2s. info Run CLI with --verbose flag for more details. hi how can I fix this build error I have a lab due on friday and having diffuculties
Caleb Cushing
10/29/2025, 1:19 AM./gradlew updateDaemonJvm --jvm-version=21
Configuration cache state could not be cached: field `__toolchainDownloadUrls__` of task `:updateDaemonJvm` of type `org.gradle.buildconfiguration.tasks.UpdateDaemonJvm`: error writing value of type 'org.gradle.api.internal.provider.DefaultMapProperty'Colton Idle
10/29/2025, 9:31 PMbuildSrc directory in your build
• separate included build (can be named build-logic for example
but an included build is also == composite buildPhilip W
10/30/2025, 6:33 AMCaleb Cushing
10/30/2025, 1:07 PMjava.lang.IllegalArgumentException: Cannot have abstract method FileSystemLocationProperty.getAsFile(): Provider<File>.
full stack/repo
https://github.com/xenoterracide/gradle-semver/actions/runs/18941346345/job/54080662841?pr=494#step:5:437Colton Idle
10/30/2025, 1:40 PMawsRepoUrl=<https://1234567890.d.codeartifact.us-east-1.amazonaws.com/maven/my-repo/>
awsUsername=aws
awsPassword=eyJ0eXAiOiJKV1QiLCJh...
and
maven {
url = uri(awsRepoUrl)
credentials {
username = awsUsername
password = awsPassword
}
}Chris Lee
10/31/2025, 12:40 AMdistZip no longer pulls the filesystem permissions.
We could force that via useFileSystemPermissions but seems cleaner to set the explicit/desired permissions in the build script.
But doing that seems to be incompatible with the configuration cache.
Seems like filePermissions is incompatible with configuration cache?
plugins {
application
}
tasks.named<Zip>("distZip") {
// setting permissions here fails as properties are finalized already
// filesMatching("**/*") {
// filePermissions {
// unix("rwxr-xr-x")
// }
// }
}
distributions {
main {
contents {
filesMatching("bin/**") {
// simply adding "filePermissions" fails
// Cause: class org.gradle.api.internal.file.copy.DefaultCopySpec cannot be cast to class org.gradle.api.file.FileCollection (org.gradle.api.internal.file.copy.DefaultCopySpec and org.gradle.api.file.FileCollection are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @3043fe0e)
filePermissions {
unix("rwxr-xr-x")
}
}
}
}
}Maksym Moroz
10/31/2025, 2:20 PMCalculating task graph as configuration cache cannot be reused because init script '../../../../private/var/folders/32/33qr05gj24jbrq7qvg4c1fjh0000gn/T/ijJvmDebugger1.gradle' has changed.
Any idea what might be causing this to happen from time to time?Bob Ham
10/31/2025, 2:40 PMoriginalTask.dependsOn myBits; myBits.shouldRunAfter originalTask but myBits still runs before originalTaskBob Ham
10/31/2025, 2:44 PMtask.named to create my bits but I get an error: The task '...' (org....Task) is not a subclass of the given typeBob Ham
10/31/2025, 3:39 PMspdxSbom {
targets {
create("release") {
configurations.set(["projectCustReleaseRuntimeClasspath"])
}
}
}
python.pip 'spdx_tools:0.8.3'
tasks.register("convertSpdxRelease", PythonTask) {
...
}
spdxSbomForRelease.finalizedBy convertSpdxRelease
convertSpdxRelease.dependsOn spdxSbomForRelease
and here is the error:
* What went wrong:
A problem occurred evaluating root project 'CustKeyboard_Studio'.
> Could not create task ':spdxSbomForRelease'.
> Configuration with name 'projectCustReleaseRuntimeClasspath' not found.
The task works fine if I comment out the configurations.set(... or if I comment out both the finalizedBy and dependsOn statements.
Anyone have a clue as to why that might be?Anish Sandeep Bhargav
10/31/2025, 8:50 PMНиколай Клебан
11/03/2025, 7:26 PMbuild-tools as includedBuild?
I’ve configured the AS to use the Gradle wrapper (version 8.14.3), but for some reason, another daemon starts up using the 9.0-milestone-1 distribution.Mike Wacker
11/03/2025, 10:35 PMcomposeUp task for the avast.gradle.docker-compose to run first if the test task is out-of-date, but it (and the composeDown task) should abe skipped if the test task is skipped.
Context: https://github.com/avast/gradle-docker-compose-plugin/issues/453Andy Damevin
11/05/2025, 7:20 PMmavenCentral() {
metadataSources {
gradleMetadata()
mavenPom()
}
}
the weird thing is that for other repos such as guava or junit, it does look for the .module file in central even without this conf. I might be missing something..
2025-11-05T20:17:32.455+0100 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Metadata of <https://repo.maven.apache.org/maven2/io/mvnpm/esbuild-java-native-deps/2.0.0-beta-2/esbuild-java-native-deps-2.0.0-beta-2.pom>'
2025-11-05T20:17:32.456+0100 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Metadata of <https://repo.maven.apache.org/maven2/io/mvnpm/esbuild-java-native-deps/2.0.0-beta-2/esbuild-java-native-deps-2.0.0-beta-2.pom>' completed
...
2025-11-05T20:17:32.308+0100 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Metadata of <https://repo.maven.apache.org/maven2/com/google/guava/guava/33.5.0-jre/guava-33.5.0-jre.module>'
2025-11-05T20:17:32.308+0100 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Metadata of <https://repo.maven.apache.org/maven2/com/google/guava/guava/33.5.0-jre/guava-33.5.0-jre.module>' completed