Questions tagged [gradle-multi-project-build]
39 questions
1
vote
2 answers
Gradle nested projects setup
How do I set up such a project structure where I have the root project called "app", "frontend" and "backend" project inside and a count of library projects inside each. Then run a build task that would give me one backend jar and a swing (for…

kerelape
- 114
- 8
1
vote
1 answer
Use gradle plugin in parent project's buildSrc
How can a subproject in a multiproject Gradle build use a Gradle plugin that's defined in the root project's buildSrc folder?
I've basically…

Brad Mace
- 27,194
- 17
- 102
- 148
1
vote
1 answer
How do I create a Gradle project that depends on the JS from a Kotlin project?
I am using Kotlin to share logic between my back end (Java Spring Web) and front end. Getting the Java back end to call the Kotlin logic is easy: I made both part of the same Gradle Multiproject build and have the server project depend on the Kotlin…

Konstantin Tarashchanskiy
- 2,762
- 2
- 31
- 46
1
vote
2 answers
Jib gradle plugin multimodule project ClassNotFoundException
I have multi-module gradle project and using Jib plugin for build docker image and push to registry.
But, when I build image and try to run this image I get this exception:
Error: Could not find or load main class Xmx512m
Caused by:…

pronomy
- 204
- 4
- 15
1
vote
2 answers
Can I call the Gradle properties task on all projects at once in a multi-project build?
I would like to view the properties of a Gradle project, to manually ensure the values look right.
When I call the properties task from the root of a multi-project build, it lists the properties of the root project:
$ gradle -q…

M. Justin
- 14,487
- 7
- 91
- 130
1
vote
0 answers
Can't access resources in multi-project Kotlin Gradle build
So I have multi-project based Grandle build where I use Kotlin as primary language. Say default project is named as app which has both src/main/kotlin and src/main/resources directories. The werid thing is I can't access resources from the code even…

ThaFog
- 493
- 3
- 15
1
vote
1 answer
gradle custom task class makes itself uncompilable
I'm trying to write a custom Gradle task class and use it in another subproject. I'm having problems tying the build together.
In this example, I have named the subprojects "a" (for application) and "p" (for plugin, although I'm not using a plugin…

Martin Geisse
- 1,189
- 1
- 9
- 22
1
vote
1 answer
Why Gradle 5 (5.6.3) made an unexpected decision during component resolution?
I have a very large multi-project java build. After the update to the Gradle 5(4.10.3->5.6.3), one of the most terrifying things is unexpected failures during dependency resolution:
...
dependencies {
// I know about the deprecation of 'compile',…

Sergei Iakovlev
- 356
- 4
- 10
1
vote
1 answer
How can I call code from one subproject in a gradle tasks of another subproject?
I have a project with two subprojects.
One of these subprojects, "A", contains code that is being published to an artifact.
The other subproject, "B", has a task that needs to do exactly what one of the methods in A's code does. I can replicate the…

Laurence Gonsalves
- 137,896
- 35
- 246
- 299
0
votes
1 answer
Why does Gradle module need direct dependency on another module on which it does not depend on directly?
I have a multimodule project like below
ProjectA
{
interface IInterfaceA
{
api1();
api2();
}
}
ProjectB
{
class ClassB implements IInterfaceA
{
api1();
api2();
someStaticFunction();
…

Rahul Katte
- 103
- 2
- 10
0
votes
0 answers
Override publish properties from parent build.gradle
I'm trying to automate publishing of an openapi generated java client.
Its a huge pain because the generated client configures its own publishing config in the generated build.gradle file. Eg: line 82-102 in the generated java-client/build.gradle…

TheJeff
- 3,665
- 34
- 52
0
votes
1 answer
Gradle Multiproject and Kotlin Multiplatform - KMM Framework with API dependency on sibling project
Context
I'm working on a project where the web service and mobile clients share as much Kotlin code as possible. The "api" and "client" subprojects have a dependency on the "models" subproject.
The API subproject is the web service. As far as I…

edelaney05
- 6,822
- 6
- 41
- 65
0
votes
0 answers
Kotlin multi-platform multi-project how to get individual project to build
I have been spinning wheels for hours trying to get a Kotlin Multi Platform project to build within a Gradle Multi Project sample.
The sample project that I have has the following structure
Where 'myKotlinMPLib' has dependency on class within…

user7858768
- 838
- 7
- 22
0
votes
0 answers
Extending Gradle configuration from different module to inherit dependencies
I have a highly-modularized project and I would like to declare one more separate module for some special test suite. Also, I don't want to repeat declaration of any dependencies which are already in classpath of the main application's module, so I…

Kirill
- 6,762
- 4
- 51
- 81
0
votes
1 answer
Can't get test fixtures to work in gradle
I've been using these answers to try to get a test class to be visible from subproject ":A:B" to ":A:C":
(https://discuss.gradle.org/t/gradle-test-classes-needed-in-another-sub-project/13365/2)
(Multi-project test dependencies with gradle)
using…

JuanKB1024
- 324
- 1
- 17