build.gradle 4.46 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 28 29 30 31 32
			}
		}
		configurations.all {
			resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
		}
		dependencies {
PWF-WK01\pengwufeng committed
33
			classpath "com.beecode:mk-gradle-plugin:1.1.0"
PWF-WK01\pengwufeng committed
34 35 36 37 38 39 40 41 42
		}
	} else {
		// default
		repositories {
			jcenter()
		}
	}
	dependencies {
		classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.2.RELEASE")
43

PWF-WK01\pengwufeng committed
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
	}
}
// 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'

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
79 80 81 82 83
				credentials {
					username getUsername
					password getPassword
				}
				url mavenRepoUrl
PWF-WK01\pengwufeng committed
84 85
		}
		maven {
王炜晨 committed
86 87
				url aliRepoUrl
			}
PWF-WK01\pengwufeng committed
88 89 90 91 92 93 94 95 96 97 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
	} 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
127
	compile lib.net_byte_buddy
PWF-WK01\pengwufeng committed
128
	compile lib.bcp_authc
王炜晨 committed
129
	compile lib.bcp_advanced_query
PWF-WK01\pengwufeng committed
130 131 132 133 134 135 136 137 138 139 140
	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}"
141
	compile "com.beecode:xyst.dinas.oa:${inzVersion}"
杨清松 committed
142
	compile "com.beecode:xyst.dinas.biz:${inzVersion}"
杨清松 committed
143
	compile "com.beecode:xyst.dinas.project:${inzVersion}"
144
	compile "com.beecode:xyst.dinas.production:${inzVersion}"
王衍超 committed
145
	compile "com.beecode:xyst.dinas.contract:${inzVersion}"
146
	compile "com.beecode:xyst.dinas.camera:${inzVersion}"
147 148
	compile "com.beecode:xyst.dinas.price:${inzVersion}"
	compile "com.beecode:xyst.dinas.transport:${inzVersion}"
高晓磊 committed
149
	compile "com.beecode:xyst.dinas.safe:${inzVersion}"
杨清松 committed
150
	compile "com.beecode:xyst.dinas.sales:${inzVersion}"
wukaiqiang committed
151
	compile "com.beecode:xyst.dinas.statistics:${inzVersion}"
152
	compile "com.beecode:xyst.dinas.finance:${inzVersion}"
PWF-WK01\pengwufeng committed
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
	providedRuntime lib.spring_boot_starter_tomcat
}

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'