build.gradle 1.54 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 {
        mavenCentral()
        maven {
            url 'https://maven.aliyun.com/nexus/content/groups/public/'
        }
        // dili Nexus
        maven {
            allowInsecureProtocol = true
            // credentials
            credentials {
                username 'admin'
                password 'for211314'
            }
            url = 'http://mvn2.diligrp.com/artifactory/libs-snapshot/'
        }
    }
}

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}"
        }
    }
}