Slackbot
07/09/2023, 10:17 AMSlackbot
07/10/2023, 8:54 AMStefano Zanella
08/26/2024, 1:48 PM// plugin's apply() method
val buildPythonPackage = project.tasks.register("buildPythonPackage", PythonTask::class.java) {
...
it.outputs.file(
"build/libs/python/${projectConfiguration.name.get()}-${projectConfiguration.version.get()}-py3-none-any.whl"
)
}
project.artifacts {
it.add(CONSUMABLE_CONFIGURATION_NAME, buildPythonPackage)
}
I'd like to do something like:
val dynamicPackagePath = packageOutputDir.map { it.asFileTree.matching { it.include("*.whl") }.singleFile }
val buildPythonPackage = project.tasks.register("buildPythonPackage", PythonTask::class.java) {
...
it.outputs.file(dynamicPackagePath)
}
project.artifacts {
it.add(CONSUMABLE_CONFIGURATION_NAME, buildPythonPackage)
}
But apparently the path provider is resolved already during the configuration phaseHeiko
08/26/2024, 5:52 PMfilesMatching("**/*.sh") { filePermissions { user { execute = true } } }
and
filePermissions { filesMatching("**/*.sh") { user { execute = true } } }
neither gives the expected result. First option results in an error The value for this property is final and cannot be changed any further.
while the 2nd option makes all files executable, not just the *.sh
filesJean Helou
08/27/2024, 9:39 AMconfigure-on-demand
is expected to apply in a larger composite build ? the documentation of either feature doesn't mention the other.
We are exploring switching a monolithic build with 800 projects to a composite build (about 70 app builds and 5 shared libraries groups builds).
However our results so far are quite disappointing. Any configuration cache miss triggers a massively increased configuration phase ( from 2s to 22s in our tests ). the apparent reason is that configuration on demand avoidance seems to be completely lost or to only apply to the main build and not to any of the included builds.
We tried the isolated build pre-alpha but without much luck (config time goes down a bit to 10s but still configures way too many projects with regards to the requested tasks)
(using gradle 8.9 and kotlin dsl)ASIF KAMRAN MALICK
08/27/2024, 11:14 AMException in thread "main" java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 401 for URL: <the distributionUrl>
NOTE: I had earlier worked around this wrapper download issue by manually downloading the wrapper on my system(as download ), copying the distribution to the environment X and putting it in the distributionPath
By doing so I was able to get the gradle wrapper being recognized and unzipped successfully. However the project build kept failing because the dependencies could no more be downloaded and threw HTTP 401 error. I was able to successfully build the project after passing credentials to my repository configurations. But the wrapper download issue still exists.
UPDATE:
I discovered that we had been carrying over a pretty old gradle-wrapper.jar. When I replaced it with a more recent one(6.8.3) it started working out of the box and the wrapper was getting downloaded.
But I also noticed that for older gradle-wrapper.jar files the output result differed when downloading the corresponding Gradle wrapper:
using the gradle-wrapper.jar for Gradle 2.5 : error was HTTP 401,
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 401 for URL: <distribution-url-goes-here>
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install$1.call(Install.java:59)
at org.gradle.wrapper.Install$1.call(Install.java:46)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:46)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
using the gradle-wrapper.jar for Gradle 3.5.1 and any later versions : PASSED
I'm testing with above wrapper jars against the distributions Gradle 2.6(trying to upgrade a pretty old build)Stefano Zanella
08/27/2024, 2:14 PM./gradlew build
and then perform the deployment. But with this I need to maintain in the workflow definition the same links between projects that Gradle knows about automatically. And what's worse, that's something expressed by a list of files and directories in a yaml file. So I'm wondering if there's a way to just have a single deploy
task that leverages Gradle's project dependency model, and I'm wondering if anyone did or came across anything similar alreadyShridhar Vashishtha
08/27/2024, 5:29 PMCould not resolve all files for configuration 'appdebugRuntimeClasspath'.> Could not find org.apache.cordovaframework7.0.0. Any ideas on what's wrong in my gradle?
RAAXAS
08/27/2024, 6:52 PMerror: invalid source release: 17
RAAXAS
08/27/2024, 6:53 PMRAAXAS
08/27/2024, 6:53 PMBrayan Licano
08/28/2024, 5:53 PMAndrew Grosner
08/28/2024, 8:34 PMexecutionHistory
is used for. this file in my repo has grown to 24 GB 😆 is it safe to delete and itll revert to a smaller size?Peerawat Kuengnog
08/29/2024, 8:48 AMKsawery Karwacki
08/29/2024, 9:37 AMgradle/libs.versions.toml
with:
[versions]
micronaut = "4.2.0"
can i then refer to this in settings.gradle.kts
like:
dependencyResolutionManagement {
versionCatalogs {
create("mn") {
from("io.micronaut.platform:micronaut-platform:${libs.versions.micronaut}")
}
}
}
I would have single source for all versions and catalogs used within projects, to easily handle pulling of those and have automated version management (renovate). I could potentially write convention settings plugin but this only moves problem to another layer.Horizon
08/29/2024, 10:16 AMA problem occurred evaluating project ':app'.
> Plugin with id 'com.android.application' not found.
The error line in my app/build.gradle :
apply plugin: 'com.android.application'
In my android/build.gradle, i have:
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.4.2'
}
}
In my gradle-wrapper.properties, i have:
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
Any help would be greatly appreciated (Im very new to gradle and mobile developmentNithish Varanasi
08/29/2024, 1:30 PMGarrett Bunch
08/30/2024, 12:43 AMcompileSdkVersion is not specified. Please add it to build.gradleAny help would be appreciated.
zhiqiang zhang
08/30/2024, 7:10 AMFAILURE: Build failed with an exception.
* Where:
Build file 'E:\GrabCoin_1\Library\Bee\Android\Prj\Mono2x\Gradle\launcher\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':launcher'.
> Plugin with id 'com.android.application' not found.
* 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 1s
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Also, I can't understand your response yet.
Could you explain in detail, please?Peter
08/30/2024, 12:28 PMtasks.withType<KotlinCompile>() { ... }
behave the same as tasks.withType<KotlinCompile>().configureEach { ... }
? 🤔Javi
08/30/2024, 2:13 PMimplementation
configuration?Aosen Xiong
08/30/2024, 9:18 PMsourceSets {
testannotations {
java {
srcDirs = ['src/testannotations/java']
}
}
}
and I want to use it in my root project as a variable
def javadocDirs = [
project(':checker').sourceSets.testannotations.allJava,
]
I got the following error
* What went wrong:
A problem occurred evaluating root project 'checker-framework'.
> Could not get unknown property 'testannotations' for SourceSet container of type org.gradle.api.internal.tasks.DefaultSourceSetContainer.
Any idea to fix it?Santiago M. Mola
08/31/2024, 4:38 PMmudkip
08/31/2024, 10:10 PMcom.gradleup.shadow
plugin. Is it possible to exclude every single class in a package except a few whitelisted ones?
From what I am seeing on the docs, exclude
takes priority over include
so I am not sure if this is possible.Slackbot
08/31/2024, 11:13 PMDante Barbosa
09/01/2024, 12:17 AMDante Barbosa
09/01/2024, 12:17 AMorg.gradle.api.internal.catalog.GeneratedClassCompilationException: No Java compiler found, please ensure you are running Gradle with a JDK* 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.
Dante Barbosa
09/01/2024, 1:17 AMTcnicn
09/01/2024, 5:12 PMval declaredConfiguration: NamedDomainObjectProvider<Configuration> = configurations.register("declaredConfiguration") {
isCanBeResolved = false
isCanBeConsumed = false
}
val resolvedConfiguration1: Provider<Configuration> = configurations.register("resolvedConfiguration1") {
isCanBeResolved = true
isCanBeConsumed = false
// attributes
extendsFrom(declaredConfiguration.get())
}
val resolvedConfiguration2: Provider<Configuration> = configurations.register("resolvedConfiguration2") {
isCanBeResolved = true
isCanBeConsumed = false
// different set of attributes
extendsFrom(declaredConfiguration.get())
}
Yoga R
09/01/2024, 7:17 PMCould not resolve all files for configuration ':classpath'.> Could not find com.android.tools.buildG7.6.3. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.6.3/gradle-7.6.3.pom - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.6.3/gradle-7.6.3.pom Required by: project : > Could not find com.google.gms.google-services4.4.2. Required by: project : * 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.BUILD FAILED in 3s Error: Gradle task assembleDebug failed with exit code 1 In my app/build.gradle : apply plugin: 'com.google.gms.google-services' dependencies { implementation(platform("com.google.firebasefirebase bom33.2.0")) } In my android/build.gradle,i have: dependencies { classpath "com.android.tools.buildG7.6.3" classpath "com.google.gms.google-services:4.4.2" }