Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
79 views
+200

In gradle, both Kotlin and Scala compiler plugins have limitations: they can both compile Java code in mixed-order, but they cannot compile each other. The only option is to: compile Scala code first ...
tribbloid's user avatar
  • 3,792
0 votes
1 answer
41 views

I am trying to add a pre-commit check as a gradle task that handles backend and frontend in one place: tasks.register('preCommit', Exec) { dependsOn 'spotlessCheck' workingDir new File(...
Thomas's user avatar
  • 7,290
0 votes
0 answers
31 views

I'm trying to define a custom Gradle task in a Grails project. Here's the task implementation MyCustomTask.groovy package my.project import my.project.stuff.DoSomething import org.gradle.api....
ilPittiz's user avatar
  • 812
1 vote
1 answer
47 views

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
0 answers
1k views

I migrated my project from buildSrc to build-logic with conversion plugins. All plugins work good but I also have a Gradle task that downloads localizations from 3rd party service and stores its to ...
wa1demar's user avatar
0 votes
1 answer
64 views

I am new to flutter and coding in general. I am trying to run an android emulator from vs code but I keep getting the below error when trying to do so. Could you point me in the right direction of how ...
The Synergist's user avatar
2 votes
1 answer
504 views

Gradle is a magic box for me. I often don't get it and always do try and error. I use gradle 8.1 and groovy scripts. I have this small task import java.time.Instant tasks.register('continuous-build') ...
Janning Vygen's user avatar
2 votes
2 answers
3k views

I have been trying to set a simple environment variable (or system property, whatever works really) through build.gradle file to access it from a java method (which is not part of integration tests) ...
scottstots's user avatar
0 votes
1 answer
89 views

I have an application for which the testing is quite extensive. Essentially, we must run the application a few hundred thousand time on different input. So I have built a custom Gradle task which ...
DBear's user avatar
  • 527
0 votes
1 answer
129 views

I'm implementing a Gradle Java plugin which registers below task. TaskProvider<Exec> taskProvider = project.getTasks().register("spectralTask", Exec.class); taskProvider.configure(exec ...
Bee's user avatar
  • 12.5k
3 votes
1 answer
411 views

Gradle documentation states that using the getProject() method in the @TaskAction method of a Task class should not be used if you want compatibility with Gradle Configuration Cache. The question I ...
Kelvin Chung's user avatar
  • 1,405
2 votes
1 answer
1k views

I want to write a task that takes a directory from , does something with the files in it and writes the result into some other directory to. I've been led to believe this was the way to define such a ...
User1291's user avatar
  • 8,239
8 votes
4 answers
3k views

In my app, I have more than 30 build variants. Every time when I release the app, I need to publish it to different platforms, therefore I build 5 different build variants. Currently, I am doing this: ...
amira's user avatar
  • 454
0 votes
1 answer
2k views

When I try to declare the task "build" depends on another task like this: task("build").dependsOn( gradle.includedBuild("splain").task("publishToMavenLocal")...
tribbloid's user avatar
  • 3,792
1 vote
1 answer
316 views

Yesterday I was able to run a plain Java class in Android Studio without any problems. I did this by creating an Application configuration: ... for running the main() method of some class I defined ...
Decent Dabbler's user avatar
1 vote
1 answer
699 views

I'm new to Gradle and I don't know much about it, but in my gradle file I defined the following task: task helloWorld { description "Custom task" ext.srcFile = file("build/reports/...
Gamaor's user avatar
  • 145
0 votes
1 answer
877 views

I created a JavaExec task that connects to a db and does some checks. In my flyway build.gradle I call the task like this: flywayMigrate.finalizedBy(rootProject.checkOracleStandards) The task works ...
Dinu Nicolae's user avatar
  • 1,331
1 vote
1 answer
118 views

Why this is not working? I config it first then unzip it at the execution phase where I could run it manually. val nativesOS : Configuration by configurations.creating { this.isTransitive = ...
Liveon Phoenix's user avatar
4 votes
0 answers
1k views

I have a gradle multi-project hierarchy: root -buildSrc  -src/main/groovy/com/CustomTask.groovy -subproj1 -subproj1-build.gradle-settings.gradle I am able to invoke custom task - com.CustomTask only ...
Xavier DSouza's user avatar
-1 votes
1 answer
1k views

I am moving an old project which runs in it's original project. But, it's gradle has been giving me issues in a new project. The issue is that my gradle task is not recognized by the preBuild call. I ...
MD Naseem Ashraf's user avatar
1 vote
0 answers
111 views

I have written the following simple task in my android project. task testing (type: Exec) { println workingDir } gradlew testing when I run the above command in the command prompt(Windows), ...
Aman Kamani's user avatar
0 votes
1 answer
467 views

I'm trying to selectively deactive tests if there is a spring profile called "unit", which is working: @DisabledIfEnvironmentVariable(named = "SPRING_PROFILES_ACTIVE", matches = &...
jeffrey.d.m's user avatar
0 votes
1 answer
442 views

I have a standalone Gradle plugin that includes a custom task type: gradle-conventions/build.gradle plugins { id 'groovy-gradle-plugin' id 'maven-publish' } group = 'com.example' version = '1.0' ...
hertzsprung's user avatar
  • 9,984
5 votes
2 answers
862 views

I'm running into a problem when configuring an Exec-Task using an Extension-Property. Problem The configuration of my Exec-Task relies on a String-Property that is defined in an extension. ...
xani's user avatar
  • 834
1 vote
0 answers
2k views

I have some task: task foo { //Do something } foo.dependsOn(":bar:baz") foo.dependsOn(":bar2:baz2") This task should only run on windows. I know, I could do: import org.apache....
JCWasmx86's user avatar
  • 3,593