Questions tagged [javaexec-gradle-plugin]

11 questions
8
votes
4 answers

Issue with CACERTS IntelliJ + Gradle

I currently am running some REST calls behind a proxy, so I need to follow some strict processes in order for the calls to go through. Previously I was building in Eclipse for a POC, but now that I know it works, I am trying to transfer it over to…
97WaterPolo
  • 375
  • 1
  • 3
  • 24
4
votes
1 answer

Gradle How to include runtimeOnly dependencies in JavaExec classpath?

Gradle How to include runtimeOnly dependencies in JavaExec classpath? For example, subproject foo: dependencies { runtimeOnly files('libs/hello.jar') } subproject bar: dependencies { compile project(':foo') } task execHello(type:…
eastwater
  • 4,624
  • 9
  • 49
  • 118
4
votes
1 answer

How to embed Java code into Gradle build using JavaExec task

I have a Gradle-driven project to which I want to add a simple Java task. This task is very specific to the project and if it can be helped I don't want to develop it as a separate plugin. So the question is can I define such custom task within the…
Bostone
  • 36,858
  • 39
  • 167
  • 227
3
votes
1 answer

executing shell script and using its output as input to next gradle task

I am using gradle for build and release, so my gradle script executes a shell script. The shell script outputs an ip address which has to be provided as an input to my next gradle ssh task. I am able to get the output and print on the console but…
sugar
  • 251
  • 4
  • 13
2
votes
0 answers

GitHub Actions: Gradle JavaExec with dependency from build output

I'm trying to run the main method of a class in my project as a Gradle task. The caveat is that this class has a dependency on a class that is generated by a different task(Netflix DGS generateJava) It is my assumption that this should be as simple…
2
votes
0 answers

Gradle JavaExec task never finishing

I have a simple database migration JavaExec task that runs a Java class during my build process in gitlab. I have many microservices running identical code. Out of the blue, one of my services suddenly stopped building, getting stuck on this…
Colin
  • 650
  • 7
  • 15
2
votes
2 answers

Apply time limit to Gradle JavaExec tasks?

I'm setting up Randoop test case generation to run across my projects. I've achieved this with a Gradle task of type JavaExec: task RandoopGenerateL1Tests(dependsOn: ['assembleDebug']) { group = "Verification" description = "Lorem ipsum dolor…
1
vote
1 answer

Use Android module runtime classpath in JavaExec gradle task

I have and Android module which contains a Gradle JavaExec task. When running the JavaExec task, I would like it to use the classpath of the module. The JavaExec task executes a Kotlin main function which uses some 3rd party library (kotlinpoet).…
gpo
  • 3,388
  • 3
  • 31
  • 53
1
vote
1 answer

In gradle, what is the difference betweeen javaexec and a JavaExec task?

For example, I can have a JavaExec task: task javaExecCaseA(type: JavaExec) { javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(11) } classpath = files("MySimpleProgram.jar") } or, inside a…
joeking
  • 2,006
  • 18
  • 29
0
votes
0 answers

how to execute independant javaexec tasks

I have a gradle project titled 'FunctionalityMaintainer' I am trying to execute two JavaExec tasks in a build.gradle, but independantly. The following is the structure of my build.gradle task(findPattern, dependsOn:'classes', type:JavaExec){ main =…
user2179627
  • 367
  • 1
  • 4
  • 15
0
votes
1 answer

Gradle JavaExec complains about not being able to load or find main class

I'm writing a simple Gradle task to launch a java application in my build.gradle file. When I try to run the task with the --info flag, it outputs the java command as follows: /bin/java -Xmx256M -cp…
HungryTux
  • 355
  • 3
  • 14