question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In a multi module Gradle project, ignore root project by default

See original GitHub issue

Observed Behavior

In a multi-module Gradle project, after running apiDump, the file api/<projectName>.api will appear with a blank line.

Current workaround

I need to specifically ignore the root projects to avoid the creation of this file. This looks quite unnecessary:

For example,

apiValidation {
    ignoredProjects.addAll(subprojects.filter { it.name != "detekt-api"}.map { it.name } + rootProject.name)
}

Environment

The project uses a buildSrc and all scripts are in kts.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chao2zhangcommented, Dec 26, 2020

I did some further investigation and it is indeed that we have applied kotlin.jvm at the root project, but at the same time, I was wondering if there is no signature generated, should we even write the API file?

0reactions
chao2zhangcommented, Jan 5, 2021

Good point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to ignore gradle build of root project for a multi-project ...
I currently have a multi-module (multi-project) application repo. The "root" is not a runnable application. It's merely the source directory ...
Read more >
Executing Multi-Project Builds - Gradle User Manual
The basic rule behind Gradle's behavior is: execute all tasks down the hierarchy which have this name. Only complain if there is no...
Read more >
[Mutli-module gradlle project] Root Project with no source ...
In a multi -module sping boot-based gradle projects, I have a root project without any source codes, and a child project with a...
Read more >
Getting Started With Gradle: Creating a Multi-Project Build
This blog post describes how we can create a Gradle build that has more than one module.
Read more >
Getting Started | Creating a Multi Module Project - Spring
This guide shows you how to create a multi-module project with Spring Boot. The project will have a library jar and a main...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found