build.gradle 1.27 KB
plugins {
    id 'java'
    id 'org.springframework.boot' version '3.1.2'
    id 'io.spring.dependency-management' version '1.1.2'
}

jar.enabled = false
bootJar.enabled = false

allprojects {
    repositories {
        mavenLocal()
        maven {
            url 'https://maven.aliyun.com/nexus/content/groups/public/'
        }
        mavenCentral()
    }
}

subprojects {
    apply plugin: 'java'
    apply plugin: 'java-library'
    apply plugin: 'org.springframework.boot'
    apply plugin: 'io.spring.dependency-management'

    version = '1.0.0'

    java {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }

    ext {
        set('springCloudVersion', "2022.0.4")
    }

    jar.archiveClassifier = ''
    bootJar.enabled = false

    dependencies {
        implementation 'org.springframework.cloud:spring-cloud-starter'
        implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
        implementation 'org.springframework.boot:spring-boot-starter-web'
        implementation fileTree(dir: "$rootProject.projectDir/libs", includes: ['*jar'])
    }

    dependencyManagement {
        imports {
            mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
        }
    }
}