Kirill Gavrilov
03/22/2024, 10:39 AMexec {}
to providers.exec {}
to enable configuration cache and get rid of its warnings.
How can I get stdin and stdout both merged in one stream from providers.exec
? an attempt to call setXxxOutput()
which I used previously throws "Standard streams cannot be configured for exec output provider"
Posted this question with code samples on SOpablozki
03/22/2024, 8:49 PMDylan R.
03/24/2024, 5:22 PMThomas Keller
03/25/2024, 10:11 AMMain.class
) being a dependency of the task? Can I extend the classpath for the task somehow? What would you do?Philip W
03/25/2024, 2:41 PMThomas Keller
03/25/2024, 3:38 PMjava-library
plugin) and an "annotation-processor" build convention that just has dependencies { "kapt"("my.group.name:annotation-processor-lib") }
in it. I guess it's not possible to easily combine both modules into one, i.e. having a plugin who can be set up as annotation-processor, is it? Or is there some API that would allow for this?Nicholas Doglio
03/25/2024, 11:27 PM-jdk-release
value but I'm running into an error message e: JDK_HOME path is not specified in compiler configuration
🧵Adam
03/25/2024, 11:30 PMAshish Thakur
03/26/2024, 8:29 AMJuanma Leflet Estrada
03/26/2024, 11:31 AMmavelLocal()
repo. I now intend to call this plugin for projects, ideally without modifying their build.gradle
file.
Apparently the most reasonable way of doing this is placing the plugin's apply
in an init file (there was some talk in github about implementing something else to be able to call plugins from the CLI, but as far as I can see it didn't get anywhere)
Now, calling it from the target project's build.gradle
file seems to work fine, but when I try to do apply plugin: 'org.konveyor.java.plugin:konveyor-download-sources:1.0-SNAPSHOT'
from the init file, it fails. My init file looks like this:
buildscript {
repositories {
mavenLocal() // Repository where your plugin is hosted
}
dependencies {
classpath 'org.konveyor.java.plugin:konveyor-download-sources:1.0-SNAPSHOT'
}
}
apply plugin: 'org.konveyor.java.plugin:konveyor-download-sources:1.0-SNAPSHOT'
Any help would be appreciated, thanks!Maksym Moroz
03/26/2024, 12:24 PMJúlio Cesar Bueno
03/26/2024, 2:53 PMasal alghamdi
03/26/2024, 5:42 PMAdam
03/26/2024, 8:36 PMCaleb Cushing
03/27/2024, 2:47 AM./gradlew classes
Ankit kunwar
03/27/2024, 7:20 AM// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
}
Below is my settings.gradle.kts file.
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
google()
}
}
rootProject.name = "TestingPrj"
include(":app")
While building I am receiving the below error :
Plugin [id: 'org.jetbrains.kotlin.android', version: '1.9.0', apply: false] was not found in any of the following sources:
* Try:
> 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>.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.jetbrains.kotlin.android', version: '1.9.0', 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 'org.jetbrains.kotlin.android:org.jetbrains.kotlin.android.gradle.plugin:1.9.0')
Searched in the following repositories:
MavenRepo
Gradle Central Plugin Repository
Google
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPluginRequestApplicator.java:275)
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.lambda$resolvePluginRequests$3(DefaultPluginRequestApplicator.java:200)
at org.gradle.util.internal.CollectionUtils.collect(CollectionUtils.java:212)
at org.gradle.util.internal.CollectionUtils.collect(CollectionUtils.java:206)
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolvePluginRequests(DefaultPluginRequestApplicator.java:198)
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolvePluginRequests(DefaultPluginRequestApplicator.java:114)
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugins(DefaultPluginRequestApplicator.java:103)
at org.gradle.kotlin.dsl.provider.PluginRequestsHandler.handle(PluginRequestsHandler.kt:44)
at org.gradle.kotlin.dsl.provider.StandardKotlinScriptEvaluator$InterpreterHost.applyPluginsTo(KotlinScriptEvaluator.kt:220)
at org.gradle.kotlin.dsl.execution.Interpreter$ProgramHost.applyPluginsTo(Interpreter.kt:388)
.......................
.......................
Please help me to solve this issue.Peter
03/27/2024, 8:59 AMlibs.versions.mydepdendency.get()
in build script. I would like to obtain this version from BOM, like libs.versions.mybom.mydependency.get()
.Caleb Cushing
03/27/2024, 10:34 AM> Task :jpa-security:javadoc FAILED
/home/xeno/IdeaProjects/spring-app-commons/module/jpa-security/src/main/java/com/xenoterracide/model/security/IdentityProviderUser.java:60: error: cannot find symbol
public static IdentityProviderUserBuilder builder() {
^
symbol: class IdentityProviderUserBuilder
location: class IdentityProviderUser
So... IdentityProviderUserBuilder
is being generated by immutables
which is an annotation processor... but for some reason javadoc
thinks it can run before classes (but checkstyle is the opposite). FML, so I'm guessing I need to add a dependsOn
to fix this? I'm not entirely certain how to do this in a plugin such that it fixes javadoc with all of its corresponding classes. At least my brain isn't at this secondKhushbu Grover
03/27/2024, 12:02 PMTim Froehlich
03/27/2024, 5:44 PMFAILURE: Build failed with an exception.
* Where:
Settings file '/home/runner/work/automotive-design-compose/automotive-design-compose/settings.gradle.kts' line: 41
* What went wrong:
Error resolving plugin [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '0.8.0']
> A problem occurred configuring project ':plugins'.
> Could not resolve all files for configuration ':plugins:classpath'.
> Failed to transform build-logic.jar (project :build-logic) to match attributes {artifactType=jar, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.internal.hierarchy-collected=false, org.gradle.internal.instrumented=instrumented-project-dependency, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=17, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
> Immutable workspace contents have been modified: /home/runner/.gradle/caches/transforms-4/a111433840070af9baab49cbb186f7ea. These workspace directories are not supposed to be modified once they are created. Deleting the directory in question can allow the content to be recreated.
Gloria
03/27/2024, 9:47 PMBuild file 'C:\Users\glori\OpenCVProject\build.gradle.kts' line: 11
Plugin [id: 'com.android.application', version: '7.4.1', apply: false] was not found in any of the following sources:
* Try:
> 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>.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '7.4.1', 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.android.application:com.android.application.gradle.plugin:7.4.1')
[...]
BUILD FAILED in 483ms
My build.gradle.kts (Project :OpenCVProject)
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath ("com.android.tools.build:gradle:8.3.1")
}
}
plugins {
id ("com.android.application") version "7.4.1" apply false
id ("com.android.library") version "7.4.1" apply false
id("org.jetbrains.kotlin.android") version "1.5.31" apply false
}
allprojects {
repositories {
google()
mavenCentral()
}
}
My build.gradle.kts (Module :app)
plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
}
android {
namespace = "com.example.opencvproject"
compileSdk = 34
defaultConfig {
applicationId = "com.example.opencvproject"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"<http://proguard-rules.pro|proguard-rules.pro>"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.1"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
}
Caleb Cushing
03/28/2024, 1:55 AMCaleb Cushing
03/28/2024, 3:00 AMRufus
03/28/2024, 4:48 AMFAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Cannot resolve external dependency com.google.gms:google-services:4.4.1 because no repositories are defined.
Required by:
project :
Giuseppe Barbieri
03/28/2024, 4:07 PMCaused by: org.gradle.process.internal.ExecException: Process 'command '/home/elect/.jdks/openjdk-21.0.2/bin/java'' finished with non-zero exit value 1If I run using Idea, everything fine, no crash Shall I open an issue on github, or is there anything I can try before? I already removed
.build
, .gradle
, .idea
, invalidated everything and so on, nothing workedLilly
03/28/2024, 5:43 PMincludeBuild("./configuration-plugin")
In my android build I can apply the plugins like:
plugins {
id("de.mycompany.configuration.scripts.android.application")
}
The package structure of my composite build where the convention plugins rely is de.mycopnay.configuration.scripts...(e.g. android-application.kts)
. Is it possible to shorten the name without changing the package structure, so i can apply the plugins as:
plugins {
id("convention.android.application")
}
Sean Chen
03/28/2024, 9:03 PMorg.jooq:jooq
) is already in play for a project, and only add my library dependency if the other dependency exists? Basically I only want to provide this additional library functionality automatically if the project is already using the heavy-weight dependency.
Thanks for the info/help.Laurence Gonsalves
03/29/2024, 1:17 AMProvider<PluginDependency>
(eg <http://libs.plugins.com|libs.plugins.com>.example.some.plugin
) how can I convert this into something suitable to give to implementation()
? This...
implementation(libs.plugins.com.example.some.plugin)
...fails with:
Cannot convert the provided notation to an object of type Dependency: libs.plugins.com.example.some.plugin:1.2.3
Caleb Cushing
03/29/2024, 10:22 AM./gradlew clean
doesn't seem to help. Even ./gradlew clean && rm -rf .gradle build
doesn't seem to help all the time (sometimes). Where else is gradle potententially keeping some of my projects outputs (aside from downloads)? is there an option I could run to say don't reuse anything? Is there a good way to even report this kind of issue? I can tar up any and everything but a minimal reproducer would not be likely because it's not always a thing, and so I wouldn't know how to reduce it since even the correct code might not get into that state.
note: I've disabled build cache locally in hopes of solving this, no luck.Caleb Cushing
03/29/2024, 10:32 AM