Daniel Svensson
04/18/2024, 10:50 AMJakub Chrzanowski
04/18/2024, 11:21 AMprojectA
and projectB
that have my plugin applied (published to mavenLocal
to avoid questions), request the same dependency, which provides a ZIP archive.
My ExtractorTransformer
@CacheableTransform
abstract class ExtractorTransformer @Inject constructor(
private val archiveOperations: ArchiveOperations,
private val fileSystemOperations: FileSystemOperations,
) : TransformAction<TransformParameters.None> {
@get:PathSensitive(PathSensitivity.NAME_ONLY)
@get:InputArtifact
abstract val inputArtifact: Provider<FileSystemLocation>
override fun transform(outputs: TransformOutputs) { ... }
}
extracts content to outputs.dir("myDirectory")
Unfortunately, each project receives a different result:
• /Users/hsz/.gradle/caches/transforms-4/be0b936cf16986364a85a818a5917249/transformed/myDirectory/…
• /Users/hsz/.gradle/caches/transforms-4/9dd0b15bb0cb7459c7b02005374440bb/transformed/myDirectory/…
Given the extracted content is pretty huge and we count it in GB, this may be a problem to end-users.Gatito Rosa
04/18/2024, 4:59 PMCaleb Cushing
04/19/2024, 2:03 AMcheckstyleMain
is there an easy way to reverse that to just the source set name? it'd be convenient to reduce this code given feature variants and test suites
tasks.named<Checkstyle>("checkstyleMain") {
configFile = checkstyleConfig("main.xml")
}
Júlia Mombach da Silva
04/19/2024, 9:13 PMExecution failed for task ':react-native-navigation:compileReactNative71ReleaseKotlin'.
>
'compileReactNative71ReleaseJavaWithJavac' task (current target is 17) and 'compileReactNative71ReleaseKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: <https://kotl.in/gradle/jvm/toolchain>
* 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>.
BUILD FAILED in 5m 3s
242 actionable tasks: 242 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
Yeswanth Medida
04/20/2024, 9:37 AMBUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66* 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 CONFIGURE FAILED in 15s [error] [gradle-server] The supplied build action failed with an exception. [error] Error getting build for c\Users\yesh\Desktop\mob app\android The supplied build action failed with an exception. [info] Java Home: E:\jdk-22 [info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx4G,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant [info] Gradle User Home: C:\Users\yesh\.gradle [info] Gradle Version: 7.6.3 [error] FAILURE: Build failed with an exception. * What went wrong: Could not open cp_init generic class cache for initialization script 'C:\Users\yesh\AppData\Local\Temp\44d02468973653f38be97a5ab572572365d566eb727299a470f89b3cec973a6c.gradle' (C:\Users\yesh\.gradle\caches\7.6.3\scripts\7qtk5j2favq18xcp2209juoro).
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66* 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 CONFIGURE FAILED in 135ms [error] [gradle-server] The supplied build action failed with an exception. [error] Error getting build for c\Users\yesh\Desktop\mob app\android The supplied build action failed with an exception. [info] Found 0 tasks [info] Build file opened: c:\Users\yesh\Desktop\mob_app\android\app\build.gradle [info] Build file changed: c:\Users\yesh\Desktop\mob_app\android\app\build.gradle [info] Java Home: E:\jdk-22 [info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx4G,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant [info] Gradle User Home: C:\Users\yesh\.gradle [info] Gradle Version: 7.6.3 [error] FAILURE: Build failed with an exception. * What went wrong: Could not open cp_init generic class cache for initialization script 'C:\Users\yesh\AppData\Local\Temp\44d02468973653f38be97a5ab572572365d566eb727299a470f89b3cec973a6c.gradle' (C:\Users\yesh\.gradle\caches\7.6.3\scripts\7qtk5j2favq18xcp2209juoro).
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66* 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 CONFIGURE FAILED in 75ms [error] [gradle-server] The supplied build action failed with an exception. [error] Error getting build for c\Users\yesh\Desktop\mob app\android The supplied build action failed with an exception. [info] Found 0 tasks [info] Build file changed: c:\Users\yesh\Desktop\mob_app\android\app\build.gradle [info] Java Home: E:\jdk-22 [info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx4G,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant [info] Gradle User Home: C:\Users\yesh\.gradle [info] Gradle Version: 7.6.3 [error] FAILURE: Build failed with an exception. * What went wrong: Could not open cp_init generic class cache for initialization script 'C:\Users\yesh\AppData\Local\Temp\44d02468973653f38be97a5ab572572365d566eb727299a470f89b3cec973a6c.gradle' (C:\Users\yesh\.gradle\caches\7.6.3\scripts\7qtk5j2favq18xcp2209juoro).
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66* 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 CONFIGURE FAILED in 78ms [error] [gradle-server] The supplied build action failed with an exception. [error] Error getting build for c\Users\yesh\Desktop\mob app\android The supplied build action failed with an exception. [info] Found 0 tasks [info] Build file opened: c:\Users\yesh\Desktop\mob_app\android\build.gradle [info] Build file changed: c:\Users\yesh\Desktop\mob_app\android\build.gradle [info] Java Home: E:\jdk-22 [info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx4G,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant [info] Gradle User Home: C:\Users\yesh\.gradle [info] Gradle Version: 7.6.3 [error] FAILURE: Build failed with an exception. * What went wrong: Could not open cp_init generic class cache for initialization script 'C:\Users\yesh\AppData\Local\Temp\44d02468973653f38be97a5ab572572365d566eb727299a470f89b3cec973a6c.gradle' (C:\Users\yesh\.gradle\caches\7.6.3\scripts\7qtk5j2favq18xcp2209juoro).
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66* 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 CONFIGURE FAILED in 78ms [error] Error getting build for c\Users\yesh\Desktop\mob app\android The supplied build action failed with an exception. [info] Found 0 tasks [error] [gradle-server] The supplied build action failed with an exception. [info] Build file changed: c:\Users\yesh\Desktop\mob_app\android\app\build.gradle [info] Java Home: E:\jdk-22 [info] JVM Args: --add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx4G,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant [info] Gradle User Home: C:\Users\yesh\.gradle [info] Gradle Version: 7.6.3 [error] FAILURE: Build failed with an exception. * What went wrong: Could not open cp_init generic class cache for initialization script 'C:\Users\yesh\AppData\Local\Temp\44d02468973653f38be97a5ab572572365d566eb727299a470f89b3cec973a6c.gradle' (C:\Users\yesh\.gradle\caches\7.6.3\scripts\7qtk5j2favq18xcp2209juoro).
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66* 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 CONFIGURE FAILED in 70ms [error] Error getting build for c\Users\yesh\Desktop\mob app\android The supplied build action failed with an exception. [info] Found 0 tasks [error] [gradle-server] The supplied build action failed with an exception.
Muslim bin Sohail
04/20/2024, 9:50 AMBUG! exception in phase 'semantic analysis' in source unit 'C:\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\app_plugin_loader.groovy' Unsupported class file major version 65can anyone help and guide regarding this?? I've applied all possible solutions available on internet
Yeswanth Medida
04/20/2024, 11:09 AMLaurence Gonsalves
04/22/2024, 6:56 AMRobert Strauch
04/22/2024, 11:57 AMcommons-compress:1.25.0
on the classpath which is vulnerable to the following CVEs:
• CVE-2024-25710
• CVE-2024-26308
How would I address the update of commons-compress?Björn Mayer (aqab0N)
04/23/2024, 10:46 AMbuild-conventions
.
Before that, when I was still playing around with them, I had convention plugins in buildSrc
. With TYPESAFE_PROJECT_ACCESSORS
enabled, there were even accessors created for the convention plugins. This is not the case, when the plugins lay in build-conventions
.
I now tried to move the plugins to buildSrc
.
Unfortunately, I cannot compile the plugins.
I am using one convention plugin in another. This "base" plugin cannot be found.
I have questions:
• Is it a good idea to have a "base" plugin?
• Is it okay to use one convention plugin in another? If so, what am I doing wrong in buildSrc?Giuseppe Barbieri
04/23/2024, 11:18 AMGavin Ray
04/23/2024, 3:32 PMversion = "1.0.0"
or so in my root settings.gradle.kts
and then have the artifacts at subprojects /foo
and /bar
be published with that versionGavin Ray
04/23/2024, 4:00 PMlibs
from /gradle/libs.versions.toml
in my plugins {}
blocks?
I have a subproject foo
where I'm trying to do this:
plugins {
id(libs.kotlin.allopen.plugin)
}
That being declared in libs.versions.toml
as:
[versions]
kotlin = "1.9.22"
[libraries]
kotlin-allopen-plugin = { module = "org.jetbrains.kotlin:kotlin-allopen", version.ref = "kotlin" }
Gavin Ray
04/23/2024, 4:57 PMorg.gradle.api.GradleException: Included build \my-project\build-logic has build path :build-logic which is the same as included build /my-project/build-logic
Philip W
04/24/2024, 7:13 AMJúlio Cesar Bueno
04/24/2024, 9:36 AM:core
module, which depends on :libs:volley-repack
module...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':core:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':core:debugCompileClasspath'.
> Could not resolve project :libs:volley-repack.
Required by:
project :core
> The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.3.2', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'. However we cannot choose between the following variants of project :libs:volley-repack:
- projectHealthElements
- resolvedDepsElements
All of them match the consumer attributes:
- Variant 'projectHealthElements' capability android-vente-privee.libs:volley-repack:unspecified:
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.3.2')
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
- Provides attribute 'dagp.internal.artifacts' with value 'project-health' but the consumer didn't ask for it
- Doesn't say anything about its component category (required a library)
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Doesn't say anything about its usage (required compile-time)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
- Variant 'resolvedDepsElements' capability android-vente-privee.libs:volley-repack:unspecified:
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.3.2')
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
- Provides attribute 'dagp.internal.artifacts' with value 'resolved-deps' but the consumer didn't ask for it
- Doesn't say anything about its component category (required a library)
- Doesn't say anything about its target Java environment (preferred optimized for Android)
- Doesn't say anything about its usage (required compile-time)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
the volley build.gradle.kts is just
configurations.maybeCreate("default")
artifacts.add("default", file("bettervolley-repack-1.0.1.aar"))
sadly, I can't just remove volley from the project as a solution.... would anyone know how I can fix this taskJuanma Leflet Estrada
04/24/2024, 11:45 AM-Dorg.gradle.java.home=<path to JDK home>
, but it's being ignored in favour of the JAVA_HOME
env variable. I am using a Gradle 4.3 through a wrapper. I can't find info about the precedence of the different levels of configuration in the docs. Is there a sort of "universal" way of specifying the JVM to use that works with older (and newer) versions of Gradle? Thank you.Dylan Bolger
04/24/2024, 12:45 PMJavaPlugin.JAR_TASK_NAME
Aaron Ferguson
04/24/2024, 1:08 PMakash pawar
04/24/2024, 4:28 PMThe specified project directory '/Users/ak***/len***/integrations' does not exist.
<- although this is module i have added earlier and deleted later manually since then gradly sync is breaking … how can i resolve this?Laurence Gonsalves
04/24/2024, 9:09 PMremoveUnusedEntriesAfterDays
, but what I'd really like is a way to remove any cache or intermediate files that would not be used to in the execution of any currently existing tasks.
We're using Gradle in a GitLab CI pipeline, and have found that over time the cache eventually gets big enough that having it is more expensive than not having it. GitLab CI caches work by zipping up the cached directories, uploading the zip remotely, and then later downloading it and unzipping it. So when the cache contains unused files, time and space are wasted transferring and (un)zipping.
I'm thinking to have our jobs wipe the entire cache once daily, but I'm wondering if Gradle can do something smarter than a complete wipe.Lee Rhodes
04/24/2024, 11:36 PMLee Rhodes
04/24/2024, 11:54 PMgradle init
again also now fails. What do I have to delete from the root dir to do the init from scratch?Fernando Valdez
04/25/2024, 8:25 AMCould not determine the dependencies of task ':integrationTest'.
> Could not get unknown property 'outputDir' for integration Java source of type org.gradle.api.internal.file.DefaultSourceDirectorySet.
There is a test.gradle
file that looks like this:
test {
maxParallelForks = 3
minHeapSize = "3g"
maxHeapSize = "3g"
jvmArgs('-Duser.timezone=UTC')
systemProperty('micronaut.environments', System.getProperty('micronaut.environments'))
useJUnitPlatform()
}
task integrationTest(type: Test) {
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
}
check.dependsOn integrationTest
And this is the only place where the integrationTest task is referenced.
The folder structure of my project is as follows:
src
|---- integration
| |------- groovy
|---- main
| |------- groovy
| |------- resources
|---- test
| |------- groovy
| |------- resources
In my build.gradle
file I declare the sourceSets integration
sourceSets {
integration {
groovy.srcDir "$projectDir/src/integration/groovy"
resources.srcDir "$projectDir/src/integration/resources"
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
}
I am quite stuck at this point, any information would be welcome and I thank you in advance for the space.
I will be sharing in this thread the complete log 🧵Jishin John
04/25/2024, 12:14 PMTrevJonez
04/25/2024, 4:39 PMA problem was found with the configuration of task 'appuploadAkorbiAssets' (type 'UploadAkorbiAssetTask').
- Type 'com.aetna.akorbi.UploadAkorbiAssetTask' property 'translationTargets.$9.enUsFilePath' specifies file '/home/circleci/project/app/src/main/res-features/notificationcenter/values/strings.xml' which doesn't exist.attempt thus far was to run with
-m
but it doesn't actually trigger the get() on the task inputs.Laurence Gonsalves
04/26/2024, 2:33 AMSlackbot
04/26/2024, 4:44 AMArtur Tuzim
04/26/2024, 7:58 AM+ gradle :app:assembleInstalledAppDebug --scan --info
Initialized native services in: /home/gradle/.gradle/native
Initialized jansi services in: /home/gradle/.gradle/native
Received JVM installation metadata from '/opt/java/openjdk': {JAVA_HOME=/opt/java/openjdk, JAVA_VERSION=21.0.2, JAVA_VENDOR=Eclipse Adoptium, RUNTIME_NAME=OpenJDK Runtime Environment, RUNTIME_VERSION=21.0.2+13-LTS, VM_NAME=OpenJDK 64-Bit Server VM, VM_VERSION=21.0.2+13-LTS, VM_VENDOR=Eclipse Adoptium, OS_ARCH=amd64}
Removing daemon from the registry due to communication failure. Daemon information: DaemonInfo{pid=299, address=[1dfd34a4-9b7f-4762-a4d8-0dc6e4e64993 port:40889, addresses:[/127.0.0.1]], state=Idle, lastBusy=1714081531027, context=DefaultDaemonContext[uid=24a72ac7-b619-4880-b32d-11af5ba6b1fb,javaHome=/opt/java/openjdk,daemonRegistryDir=/home/gradle/.gradle/daemon,pid=299,idleTimeout=10800000,priority=NORMAL,applyInstrumentationAgent=true,daemonOpts=-XX:+UseParallelGC,--add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx3g,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]}
Removing 12 daemon stop events from registry
Previous Daemon (299) stopped at Fri Apr 26 07:38:44 UTC 2024 by user or operating system
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Starting process 'Gradle build daemon'. Working directory: /home/gradle/.gradle/daemon/8.7 Command: /opt/java/openjdk/bin/java -XX:+UseParallelGC --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx3g -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /opt/gradle/lib/gradle-launcher-8.7.jar -javaagent:/opt/gradle/lib/agents/gradle-instrumentation-agent-8.7.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.7
Successfully started process 'Gradle build daemon'