Sebastian Schuberth
05/19/2025, 11:09 AMTapchicoma
05/19/2025, 2:28 PMBhavana Dornadula
05/19/2025, 5:58 PMUnable to download com.salesforce.csg.testautomation.services:CSG-UnifiedTestAutomation-Services:7.0.0-local-SNAPSHOT:sources from MavenLocal. Ensure that all the artifact's components are available in this repository. Alternatively, adjust the order of repositories in build.gradle to prioritize downloading from the repository with the full set of components.
Robert Elliot
05/21/2025, 2:00 PMAdam Roberts
05/21/2025, 5:35 PMAdam Roberts
05/21/2025, 7:06 PMAdam Roberts
05/22/2025, 12:27 AMEstevan Fick
05/22/2025, 2:09 PM./gradlew :module:sourceSets
, the screenshotTest is shown on the list, but when I try to use it on the gradle script, I get "SourceSet with name 'screenshotTest' not found. Is this the correct way to add a different directory?Sebastian Schuberth
05/23/2025, 8:27 AMPATH
on the build machine, it will not get bootstrapped, right? Or does the wrapper only look among versions that have been bootstrapped by the wrapper before to ~/.gradle/wrapper/
?Lee Turner
05/23/2025, 11:14 AMpublishing {
publications {
mavenJava(MavenPublication) { publication ->
artifactId = 'lib-name'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
repositories {
maven {
....
}
}
}
This works fine. Now we are obfuscating the code using proguard and we updated this to use the jar generated by the proguard task:
publishing {
publications {
mavenJava(MavenPublication) { publication ->
artifactId = 'lib-name'
artifact(tasks.proguard.outputs.files[0]) {
builtBy(tasks.proguard)
}
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
repositories {
maven {
}
}
This does work in the sense that it publishes the jar generated by proguard but importantly it doesn't generate the same .pom
file with all the associated dependencies as the one generated from the components.java
artifact (and the sources jar but this is less important at the moment). Is there a way to use the jar from the proguard task but still have all the other parts of the publication from the components.java artifact ? I tried using both artifacts at the same time but that generated an error - Invalid publication 'mavenJava': multiple artifacts with the identical extension and classifier ('jar', 'null').
. Adding a classifier to the proguard artifact works but then both jars are published and the proguard jar has the classifier appended to the filename. I also tried adding the pom {}
element to the publication and removing the components.java
artifact but that generated the pom but without all the dependencies that are present when generated from the components.java
artifact. I am currently looking into just copying jars around but was wondering if there was a better way using the artifacts?Andrzej Zabost
05/23/2025, 1:15 PMbuildDir
directory in each project (including the top-level project).
but it doesn't seem to be the case when I'm testing it in my project running Gradle 8.10.2.
If I delete the custom clean
task registered in the top-level build.gradle.kts
file:
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory)
}
then run ./gradlew clean --dry-run
, I can't see the top-level clean
task on the list.
If I restore the custom clean
task in build.gradle.kts
and re-run that command, the task is listed as expected. So it doesn't seem to be true that "modern Gradle automatically includes this task for top-level project".
Can someone clarify if I'm expected to manually register a clean
task in root build.gradle.kts
or is this practice deprecated in favor of something else?Matei David
05/23/2025, 6:25 PMGradleRunner.create().withTestKitDir(myTestHomeDir).withPluginClasspath().withProjectDir(myProjectDir).withDebug(false)
.
(Initially I had tried withDebug(true)
to get coverage, but cc-enabled tests fail due to the presence of the Jacoco agent, so I gave up on coverage for cc tests.)
Still, with the settings above, my cc tests pass on Windows and fail on Linux with a message that:
"Class com.sun.jna.NativeLibrary: external process started /sbin/ldconfig -p...
Starting an external process /sbin/ldconfig -p during configuration time is unsupported"
I tried to identify the culprit that might execute ldconfig, and I suspect it is caused by the recently added Nebula Info.
Still, I am puzzled why Gradle complains about the ldconfig call only on Linux and not on Windows.
I'm not too familiar with Neblua, but I suspect this OS-specific branching might occur elsewhere.
Does anyone have any suggestions how to fix my cc-enabled tests on Linux without ditching Nebula Info?
Is there any guideline specifically about Gradle cc and Jna/ldconfig on Linux in particular?
EDIT: I found the Linux call here: https://github.com/nebula-plugins/gradle-info-plugin/blob/main/src/main/groovy/nebula/plugin/info/ci/POSIXUtil.groovy#L23
It seems ridiculous this is being done only to get the hostname...
This is resolved, I might raise it with Nebula Info, not a Gradle issue. I'll leave this here for reference.Arjan van Wieringen (avwie)
05/25/2025, 11:06 AMno
05/26/2025, 11:51 AMdependencies {
add("instrumentedRuntime", project(":producer"))
}
`project(":producer") requires me to know the name of the producing project. It seems to me there is a way to do this without knowing the names of the producing project like the aggregate test reports plugin does.Adam
05/26/2025, 6:01 PMrepository {}
that will only use Gradle module metadata to resolve artifacts, and not assume a Maven repository layout?Adam
05/27/2025, 10:18 AMorg.gradle.jvm.version
attribute value can be an integer.
https://github.com/gradle/gradle/blob/v8.14.1/platforms/documentation/docs/src/docs/design/gradle-module-metadata-latest-specification.md?plain=1#L79-L80
https://github.com/gradle/gradle/blob/v8.14.1/platforms/documentation/docs/src/docs/design/gradle-module-metadata-latest-specification.md?plain=1#L112Akhilesh Singh
05/27/2025, 2:32 PMWhat went wrong:
Execution failed for task ':app:setup'.
> Command failed: bash -c source /Users/akhileshsingh/AndroidStudioProjects/android-truecaller/android-revelio/.pyenv/bin/activate && pip3 install -r scripts/perfetto/requirements.txt
Process 'command 'bash'' finished with non-zero exit value 1
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File "/Users/akhileshsingh/AndroidStudioProjects/android-truecaller/android-revelio/.pyenv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
~~~~^^
File "/Users/akhileshsingh/AndroidStudioProjects/android-truecaller/android-revelio/.pyenv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/akhileshsingh/AndroidStudioProjects/android-truecaller/android-revelio/.pyenv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/yh/mgnb466d79l9s3h02r8xl_200000gp/T/pip-build-env-v6qxs0vu/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/yh/mgnb466d79l9s3h02r8xl_200000gp/T/pip-build-env-v6qxs0vu/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/private/var/folders/yh/mgnb466d79l9s3h02r8xl_200000gp/T/pip-build-env-v6qxs0vu/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 30, in <module>
File "<string>", line 27, in get_version
KeyError: '__version__'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
* 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 get full insights.
> Get more help at <https://help.gradle.org>.
Philip W
05/28/2025, 7:19 AMEli Graber
05/28/2025, 9:14 AMNadav Gampel
05/28/2025, 11:58 AMRob Pridham
05/28/2025, 3:19 PMtestDebugUnitTest
is not running unit tests in most of our application modules, i.e. com.android.application
ones. It happily runs them in all the library modules, and curiously, one sample app module.
More specific tasks like testMyProductVariantDebugUnitTest
do run them.
What can I look at (logs etc) to understand why this is happening?Никита Гучаков
05/28/2025, 7:19 PMAdam
05/29/2025, 8:34 PMorg/package/version/
directories. To support Maven I think a Maven plugin could make it work, but I'm just curious whether a pom.xml
would be necessary, since the GMM contains the same data.Something
05/30/2025, 8:39 AMJames Daugherty
05/30/2025, 11:10 PMgradle wrapper
from my extracted source location, creates the wrapper. Here's the confusing part: If I have a shell script to do this step for me, the project attempts to build (and actually ignores the settings.gradle file indicating separate gralde projects so it fails to build). It doesn't generate the wrapper. Has anyone seen this before ?Martin
05/31/2025, 11:54 AMcompileClasspath
of the project, I want what other projects will see when depending on it. Seems like apiElements
is closer to what I want but it doesn't show any dependencies in ./gradlew dependencies
Vishwanth Prakash
05/31/2025, 12:18 PMWARNING: The following problems were found when resolving the SDK location:
101
Where: ANDROID_SDK_ROOT environment variable. Problem: Directory does not exist
Could you help me with this case?Arjan van Wieringen (avwie)
06/01/2025, 8:19 AMThomas Chan
06/02/2025, 4:01 AMDivya Nair
06/02/2025, 4:48 PM