0

I want to create a multi module project where each module is an individual library with individual version. The problem is that when I update one module/subproject I need to increase the version of every other module/subproject because github throws 409 conflict. How can i bypass that?

this is one of the modules/subproject **build.gradle **:

group = projectGroup
version = projectVersion

repositories {
    mavenCentral()
}

dependencies {
    api 'org.springframework.boot:spring-boot-starter-web:2.7.4'
}

this is the main build.gradle :

plugins {
    id 'java-library'
    id 'org.springframework.boot' version '2.7.4' apply false
    id 'io.spring.dependency-management' version '1.0.14.RELEASE'
    id 'maven-publish'
}

repositories {
    mavenCentral()
}

subprojects {

    apply plugin:'java-library'
    apply plugin:'maven-publish'
    apply plugin:'io.spring.dependency-management'
    sourceCompatibility = 11

    dependencyManagement {
        imports {
            mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
        }
    }

    publishing {
        repositories {
            maven {
                name = "GitHubPackages"
                url = "http://...."
                credentials {
                    username System.getenv("GITHUB_ACTOR")
                    password System.getenv("GITHUB_TOKEN")
                }
            }
        }
        publications {
            gpr(MavenPublication) {
                from(components.java)
            }
        }
    }
}

I'm expecting to be able to update one module/subproject without having to update all modules/subprojects

0 Answers0