123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- buildscript {
- ext {
- springBootVersion = '2.6.3'
- springCloudVersion = "2021.0.1"
- springCloudAlibabaVersion = "2021.0.1.0"
- projectArtifactId = 'qtzl'
- projectGroupId = "com.qtzl"
- projectVersion = "1.0.0-SNAPSHOT"
- isCommon = true
- imageVersion = System.getProperty("image.version", "v1");
- }
- repositories {
- // 使用国内阿里云仓库,下载速度快
- maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
- mavenCentral()
- }
- dependencies {
- classpath('com.bmuschko:gradle-docker-plugin:6.7.0')
- classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
- }
- }
-
- plugins {
- id 'java'
- }
-
- apply plugin: 'org.springframework.boot'
- apply plugin: 'io.spring.dependency-management'
- apply plugin: 'com.bmuschko.docker-remote-api'
- apply plugin: 'com.bmuschko.docker-spring-boot-application'
- group 'smp'
- version '1.0-SNAPSHOT'
- repositories {
-
- maven {
- allowInsecureProtocol = true
- url "http://maven.aliyun.com/nexus/content/groups/public/"
- }
- mavenCentral()
- maven {
- allowInsecureProtocol = true
- url 'https://maven.aliyun.com/repository/public'
- }
- maven {
- credentials {
- username '64478542840f2501c40fa2ca'
- password '8feFcmXsAbsj'
- }
- allowInsecureProtocol = true
- url 'https://packages.aliyun.com/maven/repository/2221276-release-00he5T/'
- }
- maven {
- credentials {
- username '64478542840f2501c40fa2ca'
- password '8feFcmXsAbsj'
- }
- allowInsecureProtocol = true
- url 'https://packages.aliyun.com/maven/repository/2221276-snapshot-nkXv85/'
- }
- }
-
-
- dependencies {
- implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: '1.2.6'
- implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '3.16'
- implementation group: 'org.reflections', name: 'reflections', version: '0.9.11'
- implementation group: 'com.txffp.study', name: 'smp-protocol', version: '1.0.2'
- implementation group: 'com.txffp.study', name: 'api-core', version: '1.0.0'
- implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
- implementation 'org.springframework.boot:spring-boot-starter-web'
- implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation'
- annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
- implementation group: 'cn.hutool',name:'hutool-all',version: '5.7.12'
- implementation 'cn.com.taiji.common:gly-common:5.1'
- implementation group: 'com.alibaba', name: 'fastjson', version: '2.0.4'
- implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
- implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis'
- implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
- implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.3'
- implementation 'tk.mybatis:mapper-spring-boot-starter:2.1.5'
- implementation 'com.alibaba:druid:1.1.9'
- implementation 'com.alibaba:druid-spring-boot-starter:1.1.9'
- implementation group: 'mysql', name: 'mysql-connector-java'
- implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '3.1.4'
- implementation 'org.springframework.cloud:spring-cloud-starter-loadbalancer'
- implementation 'com.github.wechatpay-apiv3:wechatpay-java:0.2.12'
- implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
- implementation 'oracle:ojdbc:7'
- // https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
- implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.10.0'
- implementation group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.4'
- implementation('org.springframework.boot:spring-boot-starter-test') {
- //in case of versions conflict '3.1' version of hibernate wins:
- //force = true
-
- //excluding a particular transitive dependency:
- exclude module: 'jsonassert' //by artifact name
- //exclude group: 'org.jmock' //by group
- //exclude group: 'org.skyscreamer', module: 'jsonassert' //by both name and group
-
- //disabling all transitive dependencies of this dependency
- //transitive = false
- }
-
-
- }
-
- dependencyManagement {
- imports {
- mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
- mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}"
- }
- }
-
- task jarProtocol(type: Jar) {
- archiveBaseName = "${projectGroupId}"
- archiveAppendix = "${projectArtifactId}"
- archiveVersion = "${projectVersion}"
- // archiveClassifier = 'common'
- archiveExtension = 'jar'
- from("build/classes/java/main/com/qtzl/alterSales/request/")
- into('com/qtzl/alterSales/request/')
- }
-
- apply plugin: "maven-publish"
- publishing {
- publications {
- myPublication(MavenPublication) {
- groupId = "${projectGroupId}"
- artifactId = "${projectArtifactId}"
- version = "${projectVersion}"
- if (isCommon) {
- artifact jarProtocol
- } else {
- // 如果是war包填写components.web(需要javawar插件),如果是jar包填写components.java
- from components.java
- }
-
- }
- }
- repositories {
- maven {
- def snapshotsRepoUrl = null
- if ("${projectVersion}".contains("SNAPSHOT")) {
- snapshotsRepoUrl = "https://packages.aliyun.com/maven/repository/2221276-snapshot-nkXv85/"
- } else {
- snapshotsRepoUrl = "https://packages.aliyun.com/maven/repository/2221276-release-00he5T/"
- }
- url "$snapshotsRepoUrl"
- credentials {
- username = '64478542840f2501c40fa2ca'
- password = '8feFcmXsAbsj'
- }
- }
- }
- }
-
|