build.gradle 4.53 KB
Newer Older
PWF-WK01\pengwufeng committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
buildscript {
	if ("jcenter".equals(mavenRepo)) {
		repositories {
			jcenter()
		}
	} else if ("mavenCentral".equals(mavenRepo)) {
		repositories {
			mavenCentral()
		}
	} else if ("ali".equals(mavenRepo)) {
		repositories {
			maven {
				url aliRepoUrl
			}
		}
	} else if ("local".equals(mavenRepo)) {
		repositories {
			maven {
王炜晨 committed
19 20 21 22 23
				credentials {
					username getUsername
					password getPassword
				}
				url mavenRepoUrl
王炜晨 committed
24 25 26
			}
			maven {
				url aliRepoUrl
PWF-WK01\pengwufeng committed
27
			}
王衍超 committed
28 29 30
			maven {
        		url tencentNexusMavenRepo
      		}
PWF-WK01\pengwufeng committed
31 32 33 34 35
		}
		configurations.all {
			resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
		}
		dependencies {
PWF-WK01\pengwufeng committed
36
			classpath "com.beecode:mk-gradle-plugin:1.1.0"
PWF-WK01\pengwufeng committed
37 38 39 40 41 42 43 44 45
		}
	} else {
		// default
		repositories {
			jcenter()
		}
	}
	dependencies {
		classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.2.RELEASE")
王衍超 committed
46 47 48
		if ("true".equals(useEcj)) {
			classpath "com.beecode:ecj-plugin:0.5.1"
		}
PWF-WK01\pengwufeng committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
	}
}
// plugins {
//   id "com.gorylenko.gradle-git-properties" version "1.5.1"
// }

// gitProperties {
//     dateFormat = "yyyy-MM-dd'T'HH:mmZ"
//     dateFormatTimeZone = "GMT+8"
// }
ext {
	inzVersion               = "1.0.+"
	ueditorVersion			 = "1.0.+"
}

apply from: "../common.gradle"
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
apply plugin: 'eclipse'
王衍超 committed
68 69
apply plugin: "idea"
apply plugin: 'com.beecode.enzyme.ecj-plugin'
PWF-WK01\pengwufeng committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

war {
	baseName = 'inz'
}

repositories {
	if ("jcenter".equals(mavenRepo)) {
		jcenter()
	} else if ("mavenCentral".equals(mavenRepo)) {
		mavenCentral()
	} else if ("ali".equals(mavenRepo)) {
		maven {
			url aliRepoUrl
		}
	} else if ("local".equals(mavenRepo)) {
		maven {
王炜晨 committed
86 87 88 89 90
				credentials {
					username getUsername
					password getPassword
				}
				url mavenRepoUrl
PWF-WK01\pengwufeng committed
91 92
		}
		maven {
王炜晨 committed
93
				url aliRepoUrl
王衍超 committed
94 95 96 97
		}
		maven {
        		url tencentNexusMavenRepo
      		}
PWF-WK01\pengwufeng committed
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
	} else {
		// default
		jcenter()
	}
}

dependencies {
	compile lib.spring_boot_starter_web
	
	compile lib.thymeleaf_extras
	compile lib.spring_security_core
	compile lib.spring_security_config
	compile lib.spring_security_web
	compile lib.hibernate_core
	compile lib.hikari
	compile lib.mysql_connector

	compile lib.spring_boot_starter_data_redis
	compile "org.springframework.boot:spring-boot-starter-json:${springBootVersion}"
	compile "org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}"
	compile lib.spring_boot_starter_jdbc
	compile lib.spring_boot_starter_security
	compile lib.spring_boot_starter_web_service
	compile lib.spring_session_core
	compile lib.spring_session_redis
	compile lib.liquibase
	compile lib.cxf_rt_frontend_jaxws
	compile lib.cxf_rt_transports_http
	compile lib.amino_boot
	compile lib.amino_boot_web
	compile lib.amino_shell
	compile lib.amino_tenant
	compile lib.amino_tenant_liquibase
	
	compile lib.bap2_attachment
	compile lib.bap2_core
	compile lib.bap2_sysconfig
	compile lib.bap2_system
	compile lib.hibernate_common_annotations
airyuxun committed
137
	compile lib.net_byte_buddy
PWF-WK01\pengwufeng committed
138
	compile lib.bcp_authc
王炜晨 committed
139
	compile lib.bcp_advanced_query
PWF-WK01\pengwufeng committed
140 141 142 143 144 145 146 147 148 149 150 151
	compile lib.bcp_import
	compile lib.json
	compile "com.beecode:inz.authmgr:${inzVersion}"
	compile "com.beecode:inz.common:${inzVersion}"
	compile "com.beecode:inz.query:${inzVersion}"
	compile "com.beecode:inz.basis:${inzVersion}"
	compile "com.beecode:inz.init.data:${inzVersion}"
	compile "com.beecode:inz.authentication:${inzVersion}"
	compile "com.beecode:inz.workflow:${inzVersion}"
	compile "com.beecode:inz.message:${inzVersion}"
	compile "com.beecode:inz.enterprisesetting:${inzVersion}"
	providedRuntime lib.spring_boot_starter_tomcat
王衍超 committed
152 153 154 155 156 157 158 159 160
	
	compile ("com.tencent.tsf:spring-cloud-tsf-starter:1.29.1-Greenwich-RELEASE"){
		exclude group: 'org.springframework.plugin', module: 'spring-plugin-core'
		exclude group: 'org.springframework.plugin', module: 'spring-plugin-metadata'
	}
	compile "org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE"
	compile "org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE"
	//compile "org.springframework.cloud:spring-cloud-starter:${springBootVersion}"

PWF-WK01\pengwufeng committed
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
}

def projName = name
def projVersion = version
def warPath = war.archivePath.absolutePath
task generateResultInfo() {
	if (outFile != null && !outFile.isEmpty()) {
		doLast {
			def builder = new groovy.xml.StreamingMarkupBuilder()
			builder.encoding = 'UTF-8'
			def resultInfo = {
				mkp.xmlDeclaration()
				it.build {
					it.project(name: projName, version: projVersion) {
						it.artifact(path: warPath)
					}
				}
			}
			def writer = new FileWriter(outFile)
			try {
				writer << builder.bind(resultInfo)
			} finally {
				writer.close()
			}
		}
	}
}
build.dependsOn 'generateResultInfo'