Questions tagged [gradle-kotlin-dsl]

Kotlin language support for Gradle build scripts.

Gradle build scripts have historically been written in Groovy. The Gradle Kotlin DSL project was created to create statically typed, clear, concise,and descriptive build scripts with awesome IDE support.

Build scripts are written in the Kotlin programming language, but using a Kotlin DSL (domain specific language) designed specifically to support building software.

Questions that belong here:

  • What causes a specific build script error?
  • How to convert a specific construct of a Groovy build script to its Kotlin equivalent?
  • How to achieve a specific processing task in your Kotlin build script?

Do not use this tag for general gradle questions.

Note: Before version 0.10.1 the "Gradle Kotlin DSL" project was called "Gradle Script Kotlin".

1145 questions
0
votes
1 answer

Gradle (Kotlin DSL): "Unresolved reference: proguard"

Im trying to get Proguard to work but Im still new to Gradle. My build gradle.kts haves an error (Unresolved reference: proguard), I cant create a proguard Task: plugins { id("com.github.johnrengelman.shadow") version "5.2.0" java …
0
votes
1 answer

Gradle's Kotlin DSL script cannot start Quarkus application

I'm in my journey to (try to) migrate the Gradle script(s) –written in Groovy- that I have in a (working) Quarkus 1.1.0.Final proof-of-concept project into Kotlin DSL, but somehow, after migrating the script(s), the application doesn't start…
x80486
  • 6,627
  • 5
  • 52
  • 111
0
votes
1 answer

Kotlin MPP - Cannot resolve Stetho Interceptor

I'm trying out for the first time to build a Kotlin MPP using a Kotlin DSL gradle file. The issue is quite simple but I've been trying everything I could think of to fix it : the android shared code can't resolve Stetho interceptor Screenshot of the…
0
votes
1 answer

How to Run a Kotlin Task from Android Project's build.gradle?

My project's build.gradle is in Groovy but I'd like to run as a gradle task the main function of a Kotlin class in a root directory kt file. I don't know where to begin in terms of syntax. something like this? I came up with this after searching…
Grant Park
  • 1,004
  • 1
  • 9
  • 29
0
votes
1 answer

Shaddow Jar missing some Vert.x classes from dependecies

I have successfully created a shadow-jar with few verticles using Kotlin coroutines extension and able to run them via vertx run command line while specifying the path to my jar except a verticle that on its start-up creates a telnet shell with…
kuza
  • 2,761
  • 3
  • 22
  • 56
0
votes
1 answer

How do you upload an expansion file to a Draft Apk using Google Play Developer API Client Library for Java?

My current workflow is I publish my apks (4 splits by abi) to alpha in draft. This works fine because I am using Gradle Play Publisher. The next step is I upload the expansion file, this is a custom gradle task. I start an edit with an authenticated…
0
votes
0 answers

Getting newly published package from JitPack fails

I'm trying to publish my java library to JitPack using the maven-publish plugin in Gradle. I have done all that the docs have said, and JitPack says publishing was a success, but it seems like I cannot install my library, even if I just copy and…
0
votes
0 answers

Using build.gradle.kts to add file to .framework when build iOS framework

I am using Kotlin multiplatform, and I'd like to know is it possible to put some files to .framwork when build for iOS. Following is part of my build.gradle.kts file: val packForXcode by tasks.creating(Sync::class) { val targetDir =…
James Fu
  • 444
  • 1
  • 8
  • 21
0
votes
1 answer

Gradle not recognizing springboot buildInfo plugin

I am trying to add the springboot buildInfo plugin to my build.gradle.kts so I can generate the build-info.properties file and expose the build info (i.e. app version) via the /actuator/info endpoint. However, I keep getting the following error when…
0
votes
1 answer

gradle always use repo.maven.apache.org even if i point custom repositories

From my network i can't access https://repo.maven.apache.org/maven2 repository, so i have to point proxy like http://nexus.companyproxy.com:8099/nexus/content/groups/public My configuration contains only this repositories { …
Seldon
  • 43
  • 5
0
votes
1 answer

Where to put credentials in gradle

Where can I put my credentials in gradle without making them public? I would like to know some best pratics, and to understand well the difference between inserting them in gradle.properties or as environment variable. It's important to me know how…
0
votes
0 answers

how to get Eclipse to correctly open a gradle project?

Both Kotlin and Gradle installed fine through the marketplace: And I've right clicked the project "refresh dependencies" from the Gradle context menu: what else can I do to get Eclipse to load this project? Despite the errors from Eclipse, it…
Thufir
  • 8,216
  • 28
  • 125
  • 273
0
votes
0 answers

how to correct red "import" error messages from Eclipse?

I created a project using gradle init --type java-application --test-framework testng --dsl kotlin but Eclipse shows: For what it's worth, this runs fine: thufir@dur:~/eclipse-workspace/baseX$ thufir@dur:~/eclipse-workspace/baseX$ gradle clean…
Thufir
  • 8,216
  • 28
  • 125
  • 273
0
votes
2 answers

Publish java library with custom primary artifact

I m trying to create a java library with custom primary artifact.. I followed this documentation, but the problem is when i run the "publish" task, i get this error. Could not determine the dependencies of task…
user10256891
0
votes
1 answer

Protobuf configuration Intellij Idea Plugin Gradle-kotlin-dsl kotlin

Hey I would like to set up protobuf in intellij idea plugin as a client for other protobuf server (written in golang). That will be my first java approach to grpc. I tried to use kotlin classess generator, but i had even less sucess than with this…
Unlucky
  • 173
  • 4
  • 15