Gradle has a set of standard tasks provided by common plugins, but also allows defining custom tasks. A gradle task is an atomic unit of work that is scheduled before or other after tasks depending on task ordering constraints.
Questions tagged [gradle-task]
154 questions
0
votes
1 answer
Make a simple JAR in gradle
I am new to gradle builds. I wrote a custom service for cloudera manager which needs to build a JAR file with few directories. It is a simple archive file with few directories(descriptor, images and scripts). I created it with below jar command…

Srikanth
- 517
- 3
- 10
- 29
0
votes
1 answer
Can I run a specific group of gradle tasks
I have a set of gradle tasks which can run in any order
and I grouped them into 3 sets A, B and C
is there a way to run a specific group of task ? like I want to run only A
only B and may be a combination of A & B

PCB
- 638
- 1
- 11
- 22
0
votes
0 answers
Error 13 Permission denied on gradle task
I'm trying to run the current task on build.gradle (Project) and receiving the following error:
java.io.IOException: error=13, Permission denied.
task ("modifyStrings") {
doLast{
exec{
workingDir '.'
executable…

BlitzkriegBlue
- 101
- 2
- 14
0
votes
1 answer
Plugin extension name clash with task name
I have a plugin that has same name for its plugin extension and for task name (both are named plantUml).
I would like to run task before build. How can I do that?
When I type:
build dependsOn: plantUml
then I get information that it cannot be…

pixel
- 24,905
- 36
- 149
- 251
0
votes
1 answer
Execute a task only if a particular task is run
I want the task setupDB to execute if and only if the task fatJar or slimJar is run.
But after adding gradle.taskGraph.whenReady, commandLine './scripts/configureSQLiteDB.sh' is never running for any task.
Here is my code for the setupDB…

Kaustubh Trivedi
- 378
- 2
- 8
0
votes
1 answer
Set Gradle custom task inputs and outputs
I am writing a Gradle plugin in Kotlin, adding a custom task.
How do I go about declaring the task's inputs and outputs?

Vic Seedoubleyew
- 9,888
- 6
- 55
- 76
0
votes
1 answer
Gradle Task - Https request - attach client certificate
I'm trying to implement a gradle task that sends a HTTPS request to my backend. For authentication, I have to attach a client certificate to the request.
Does anybody know how to do this? I'm currently using the library http-builder-ng but haven't…

phoebus
- 1,280
- 1
- 16
- 36
0
votes
1 answer
Gradle custom task implementation: could not find method for arguments
I have an encryption task that receives an input file and an output file along with the key to perform encryption against. The strange thing is that when I try in extract a method that performs a line encryption and receives it as an argument, I get…

nyarian
- 4,085
- 1
- 19
- 51
0
votes
1 answer
Gradle: what is the task structure for native builds (cpp plugin)?
For Java builds (plugin "java"), there exists this very nice image about halfway through the Java Plugin page showing the normal workflow of a java build.
Question: what would be the similar illustration for the native ("cpp") plugin? The Building…

haelix
- 4,245
- 4
- 34
- 56
0
votes
0 answers
Where to put generated string-resoures that will be included in R.class generation and can be used in layouts?
I'm having a custom JavaExec gradle task
which I currently use for generating several string resource files for android and other platforms.
I found out that when I'm using gradle directly, like this:
buildTypes {
debug {
resValue…

TheWhiteLlama
- 1,276
- 1
- 18
- 31
0
votes
1 answer
Gradle: using task's member as an other task's input
setVersionTask sets a member that I want to be used as input by getVersionTask. Here's my code:
class TaskA extends DefaultTask {
@InputFile
File pbxprojectFile
@Optional
String version
@TaskAction
void exec() {
…

Riziero
- 144
- 2
- 14
0
votes
1 answer
How do I migrate "yarn run-script build" task from frontend-maven-plugin to gradle?
I use gradle-node-plugin instead of frontend-maven-plugin.
"yarn run-script build" task in maven is written such as following
yarn run-script build
yarn
…
0
votes
1 answer
Gradle : create custom task to run 3 spring boot apps
I have to create custom task in gradle to run 3 spring boot apps, but first 'dependsOn' block other commands from my task and only one app starts.
task startApps(type: Exec)
{
dependsOn 'modules::module_1::bootRun'
dependsOn…
0
votes
3 answers
Gradle task to load files from Jar
I use vendor library to generate Java sources from an Xml. This source xml imports other xml which exists in some jar file. I know the coordinates of this Jar file. The vendor library is a blackbox to me but I know that it uses…

chauhraj
- 469
- 4
- 19
0
votes
2 answers
Update TeamCity Build Number with version in Gradle build script
I have a gradle build script as below:
buildscript {
repositories {
//Some repo
}
dependencies {
classpath "com.palantir.gradle.gitversion:gradle-git-version:0.8.0"
}
}
}
apply plugin:…

hydradon
- 1,316
- 1
- 21
- 52