Fernando Sena
08/17/2024, 4:34 AMAbanoub Samuel
08/17/2024, 10:27 AMAbanoub Samuel
08/17/2024, 10:27 AMJavi
08/17/2024, 7:34 PMSyeda Ayesha Shamim
08/19/2024, 6:17 AMRun with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.* Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.devtools.ksp', version: '1.9.22-1.0.13', apply: false] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Plugin Repositories (could not resolve plugin artifact 'com.google.devtools.kspcom.google.devtools.ksp.gradle.plugin1.9.22-1.0.13') Searched in the following repositories: Google MavenRepo Gradle Central Plugin Repository at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPluginRequestApplicator.java:237) at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.lambda$resolvePluginRequests$3(DefaultPluginRequestApplicator.java:167) HOW TO SOLVE THAT
Peter
08/19/2024, 7:29 AM> Failed to publish publication 'release' to repository 'mavenLocal'
> org.codehaus.plexus.util.xml.pull.XmlPullParserException: in epilog non whitespace content is not allowed but got / (position: END_TAG seen ...</metadata>\n/... @Dchintal 13:2)Can someone help me with this please? Will post configuration in thread.
Thomas Keller
08/19/2024, 9:01 AMConfigurableFileCollection
used in SourceTask
s: Whenever a plugin uses one of those and multiple source directories are added to it (say build/generated/foo/kotlin
and build/generated/bar/kotlin
), I cannot exclude files from this said file collection via exclude("**/build/**")
or exclude("**/generated/**")
, but only match path parts beyond the configured source directories, e.g. **/SomeFile.kt
. I could not see an API in PatternFilterable
that makes this possible and my naive attempt to use FileTreeElement
via
exclude { spec ->
spec.file.absolutePath.contains("**/build/**")
}
failed as well. So what do I overlook here?Sergey Chernov
08/19/2024, 9:13 AMCONFIGURING
phase, not EXECUTING
like e.g. regular compilation dependency.
The problem is that the artifact is quite big and it's resolved in a single-thread CONFIGURING phase (while potentially it could be multi-thread EXECUTING).
I tried this approach:
configurations {
remoteApp {
attributes {
attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, "unzipped")
}
}
}
dependencies {
// example from <https://docs.gradle.org/current/userguide/artifact_transforms.html#artifact_transforms_without_parameters>
// public abstract class Unzip implements TransformAction<TransformParameters.None> {
registerTransform(Unzip) {
from.attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, "jar")
to.attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, "unzipped")
}
// libs is toml version catalog
remoteApp libs.remoteApp
}
def unpackRemoteAppTask = tasks.register('unpackRemoteApp', Copy.class) {
from({ configurations.remoteApp })
into layout.buildDirectory.dir("remoteapp/x86")
fileMode = 0755
dirMode = 0755
}
Peter
08/19/2024, 9:17 AMCannot include build 'build-logic' in build ':my-library. This is not supported yet.Is there any alternative to this workaround? https://github.com/researchgate/gradle-release/issues/304#issuecomment-1083646756
Bernhard Posselt
08/19/2024, 9:43 AMdependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("./libs.versions.toml"))
}
}
}
Is this how you do it? because my intellij seems to get confused and only shows me the buildsrc gradle tasksBernhard Posselt
08/19/2024, 10:43 AMabstract class ChangeModuleVersion : DefaultTask() {
@Input
val moduleVersion: Provider<String> = project.objects.property<String>()
and registered like this:
tasks.register<ChangeModuleVersion>("changeModuleVersion")
how do I pass I pass the parameter to the task, because ./gradlew changeModuleVersion -PmoduleVersion=0.0.1 gives me a property 'moduleVersion' doesn't have a configured value.Syeda Ayesha Shamim
08/19/2024, 12:42 PMHagar Mohamed
08/19/2024, 7:05 PMSyeda Ayesha Shamim
08/20/2024, 11:42 AMJavi
08/20/2024, 1:22 PMLOHITH KUMAR
08/20/2024, 1:36 PMbuild.gradle
files DRY by using the subprojects
block in the root project build.gradle
. My question is related to dependency management in this setup.
If I specify a dependency (e.g., com.example:library
) with version1
in a specific module's build.gradle
, but the same dependency is declared with version2
in the subprojects
block of the root project`build.gradle`, which version of the dependency will actually be used during the build process?
I want to understand how Gradle resolves such conflicts when a dependency is declared both in a module-specific build.gradle
and in the subprojects
block with different versions.
Thanks in advance for your help!Roldan Galan
08/20/2024, 3:45 PMEug
08/21/2024, 8:01 AMjava
is set in path, but JAVA_HOME is not set.Tevin Jeffrey
08/21/2024, 4:30 PMSet<Project>
is now broken across several of the plugins we use.Peter
08/22/2024, 11:13 AMprojects
reference for all gradle modules. I've tried opening other (non KMP) projects and I couldn't find that kind of property. I guess this is a KMP gradle plugin thing or am I missing something?
implementation(projects.shared)
Philip W
08/22/2024, 3:06 PM:restclient:jar' (type 'Jar') uses this output of task ':api:jar' without declaring dependency
. And I don't understand, how this could happen. Do you have any hints where I should look at the Build scan?Brandon Wong
08/22/2024, 8:08 PMgradle-wrapper.properties
file, i have the line
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
whenever i run anything with the ./gradlew
command, it tries to download the bin but stops and times out at 100%. same thing happens if i try to download it through my browser. i found another download site for the bin - is there a workaround that can use that?Stefano Zanella
08/23/2024, 8:22 AMSync
task within a custom plugin to copy files into an intermediate folder for assembling a package's content. I want to be able to configure this directory, as in another task/subproject I need to first generate the content of this directory and in other subprojects I can just use a default. The problem I'm facing is that Gradle detects a non-declared dependency between the output of the preparation task and the input of the Sync
task. I don't want to directly depend on the task as it's an internal task to the plugin. Is there a way to specify the source of a Sync
task as an input property? Some example code to better explain:
// subprojectA (build.gradle.kts)
val pkgSources = layout.buildDirectory.dir("generated/pkgSource")
myPlugin {
sourceDir = pkgSources
}
tasks.register("foo", Sync::class.java) {
from("someFolder")
into(pkgSources)
}
// custom plugin
// has extension with sourceDir DirectoryProperty
tasks.register("prepare", Copy::class.java) {
from(ext.sourceDir) // points to pkgSources
into("somewhere/else")
}
tasks.register("buildPackage") {
dependsOn("prepare")
}
If I call buildPackage
I get the non-explicit dependency error, and I assume it's because the call to from()
doesn't set an actual input for the Copy
task? Or am I missing something?Alexandru HadÄr
08/23/2024, 9:28 AMroot
project where i have a build.gradle
file.
I also have a subproject here, called app
. (this is an android project).
I'm trying to run a script after each build
task. However, gradle can't find that build
task.
In my root's build.gradle
I have :
tasks.named("build") {
finalizedBy("myTask")
}
But I keep getting:
Task with name 'build' not found in root project 'MyProject'.
But if I ran ./gradlew tasks
I get
Build tasks
-----------
assemble - Assemble main outputs for all the variants.
assembleAndroidTest - Assembles all the Test applications.
assembleUnitTest - Assembles all the unit test applications.
build - Assembles and tests this project.
Jessica Bussert
08/23/2024, 3:28 PMM3
08/23/2024, 8:50 PMjaroslav
08/25/2024, 2:33 PMMartin Nguyen
08/26/2024, 4:11 AMGradle doesnāt support marking a task as private.
However, tasks will only show up when runningSo for the code example:if:tasks
is set or no other task depends on it.task.group
tasks.register("helloTask") {
println("Hello")
}
I understand this task doesnāt show up in ./gradlew tasks
because no group has been assigned to it.
However since the docs say āor no other task depends on itā, since there are no tasks depending on this task then shouldnāt it still show in ./gradlew tasks
?Philip W
08/26/2024, 8:32 AMbusinge brian
08/26/2024, 8:55 AM../gradle/home/caches/8.6/kotlin-dsl/scripts/5c95e8bdea9d1f510522d6cd009e3ea4/metadata.bin (No such file or directory)
getting the above issue when syncing my project, any idea as to why this is happening?