All Questions
Tagged with gradle gradle-kotlin-dsl
881
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....
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
}
...
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 ...
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, ...
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?
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 ...
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 ...
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....
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("...
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 ...
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 ...
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 ...
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
...
-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 ...
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 ...