Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

0 votes
1 answer
29 views

Local AGP jar was not found in any of the following sources

It happened so that I need to make an app buildable using local tools only. I am stuck with local AGP jar. I have tried to add it to classpath: classpath(files("gradle/com.android.tools.build....
Void's user avatar
  • 1,291
0 votes
0 answers
17 views

How to specify an assertj template for every subproject?

I have defined some assertj templates in one of my subprojects. In the root build.gradle.kts I have: plugins { id("org.assertj.generator") version "1.1.0" apply false } ...
peer's user avatar
  • 4,557
0 votes
0 answers
20 views

composeCompiler inside a Gradle Plugin

I would like to configure the compiseCompiler inside my Plugin but I am unable to access it. I tried this way: class AndroidApplicationComposeConventionPlugin : Plugin<Project> { override ...
No_Name's user avatar
  • 98
0 votes
0 answers
65 views

Which Kotlin-DSl version should I be using and where to find it

I am upgrading various libraries in my project, to include upgrading to Kotlin 2.0.0 and converting from Groovy to Kotlin-DSL for my gradle builds. When running a gradle build, it runs to a success, ...
GeorgeRussell's user avatar
0 votes
1 answer
29 views

How to declare a common dependency for all subprojects?

Facing this issue with dependency injecting libraries. All subprojects have a di and i have to declare DI library every time. Is there a better way?
androidDeweleper's user avatar
0 votes
0 answers
35 views

How to properly setup project version code and name in gradle 8.4

I'm setting up some projects in gradle 8.4 and trying to create a good versioning system for those projects, my first instinct was to set the variables for minor/major/patch etc. in gradle.properties ...
wilson mielke's user avatar
1 vote
1 answer
31 views

Configure Gradle to work like a script or batch file

I have a Kotlin program that looks like this: fun main(args: Array<String>) = runBlocking { if(args.first() == "deploy") { // do deployment } } Putting aside the ...
Myles Bennett's user avatar
0 votes
1 answer
61 views

Code insight unavailable (script configuration wasn't received) when create a custom gradle.kts file

I create a sample Kotlin project with Gradle DSL using IntelliJ IDEA and when i create a custom gradle.kts file(named custom.gradle.kts, located at the same level as settings.gradle.kts & build....
Turisla's user avatar
  • 45
0 votes
0 answers
43 views

JSON Syntax Exception when parsing String containing JSON Array using TypeToken via GSON

Am having trouble parsing String containing a JSON array as a List using TypeToken via GSON in my Kotlin program. dependencies section inside gradle.build.kts: dependencies { implementation("...
PacificNW_Lover's user avatar
0 votes
0 answers
31 views

Transform classes with Gradle API's TransformAction

According to the docs, one can register transforms for artifacts and apply tasks that require them, like the Minify example. I'm looking to have an artifact transform at the .class level, i.e. not ...
Fluffy's user avatar
  • 922
0 votes
1 answer
45 views

Override Gradle Task implementation from dependency

So I have Android Project using Gradle that uses library A with Task MPManifestTask that run every time I build. The issue is I'm trying to improve my build performance using gradle configuration ...
jim's user avatar
  • 534
1 vote
2 answers
57 views

How do you create multiple test override tasks in a build.gradle.kts for different JUnit5 Tags

In this question JUnit 5 test suite choose test methods its shown how to do it in Gradle using the Groovy language... How would that translate into the equivalent for a build.gradle.kts file... Say we ...
Ryu S.'s user avatar
  • 1,847
2 votes
2 answers
110 views

Mix Java and Kotlin in Gradle Kotlin DSL with sourceSet

I have a project that mixes Java and Kotlin. The Java code in src/main/java calls Kotlin code in src/main/kotlin. The app is launched from the Kotlin part. In the build.gradle.kts, the full content ...
Raymond Chenon's user avatar
-1 votes
1 answer
23 views

Best way to re-use a function across Gradle submodules [closed]

I defined a Kotlin function in one of my submodules to load some environment variables from a file. I now want to use this function in other submodules as well, but define it only once. I can achieve ...
SilverTear's user avatar
0 votes
2 answers
160 views

How to run a main class in gradle task in android multi-module project?

In my android multi-module project, I want to execute a Kotlin file to generare code. My need is: I have a multi-module project with one app module and lots of library modules. There is a module named ...
RagAnt's user avatar
  • 1,076

15 30 50 per page
1
2 3 4 5
59