buildscript {
	ext {
		queryDslVersion = '4.2.1'
		lombokVersion = '1.18.12'
	}
}
plugins {
	id 'org.springframework.boot' version '2.4.2'
	id 'io.spring.dependency-management' version '1.0.11.RELEASE'
	id 'java'
}

group = 'com.rf'
version = 'v1.1-'+getNewVersion()
sourceCompatibility = '8'

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories {
	maven {
		url 'https://maven.aliyun.com/repository/public'
	}
	maven {
		credentials {
			username '0p07qf'
			password 'z1XwdFEf4M'
		}
		url 'https://repo.rdc.aliyun.com/repository/107260-release-GqdtcU/'
	}
	maven {
		credentials {
			username '0p07qf'
			password 'z1XwdFEf4M'
		}
		url 'https://repo.rdc.aliyun.com/repository/107260-snapshot-C6ziam/'
	}
	maven {
		url "https://plugins.gradle.org/m2/"
	}
	mavenLocal()
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	compileOnly 'org.projectlombok:lombok'
	annotationProcessor 'org.projectlombok:lombok'
//	testImplementation 'org.springframework.boot:spring-boot-starter-test'
////	classpath "gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10"
//	// https://mvnrepository.com/artifact/com.querydsl/querydsl-apt
//	compile group: 'com.querydsl', name: 'querydsl-apt', version: '4.2.1'
	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation
	implementation 'org.springframework.boot:spring-boot-starter-validation:2.6.3'

//	// https://mvnrepository.com/artifact/org.springframework.data/spring-data-commons
//	compile group: 'org.springframework.data', name: 'spring-data-commons', version: '2.4.1'
	// https://mvnrepository.com/artifact/mysql/mysql-connector-java
	implementation 'mysql:mysql-connector-java:8.0.21'

//	compile group: 'com.querydsl', name: 'querydsl-jpa', version: '4.2.1'
//	compile group: 'com.querydsl', name: 'querydsl-apt', version: '4.2.1'
	// QueryDSL
	implementation("com.querydsl:querydsl-core:${queryDslVersion}")
	implementation("com.querydsl:querydsl-jpa:${queryDslVersion}")
	//关键地方(记得开启annotationProcessor)
	annotationProcessor("com.querydsl:querydsl-apt:${queryDslVersion}:jpa",
			"org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final",
			"javax.annotation:javax.annotation-api:1.3.2",
			"org.projectlombok:lombok")

	// Lombok(记得安装IDEA插件)
	compileOnly "org.projectlombok:lombok:${lombokVersion}"
	annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
	implementation("org.projectlombok:lombok:${lombokVersion}")
	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test
	testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.3'

	// https://mvnrepository.com/artifact/com.alibaba/fastjson
	implementation 'com.alibaba:fastjson:1.2.83'
	// https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
	implementation 'org.apache.poi:poi-ooxml:3.17'

	// https://mvnrepository.com/artifact/commons-lang/commons-lang
	implementation 'commons-lang:commons-lang:2.6'

	// https://mvnrepository.com/artifact/io.springfox/springfox-swagger2
	implementation group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
	// https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui
	implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
	// https://mvnrepository.com/artifact/io.swagger/swagger-annotations
	implementation group: 'io.swagger', name: 'swagger-annotations', version: '1.5.22'
	implementation group: 'io.swagger', name: 'swagger-models', version: '1.5.22'

	// https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload
	implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1'
	// https://mvnrepository.com/artifact/com.github.qcloudsms/qcloudsms
	implementation group: 'com.github.qcloudsms', name: 'qcloudsms', version: '1.0.6'
	// https://mvnrepository.com/artifact/cn.keking.project/kk-anti-reptile
	implementation group: 'cn.keking.project', name: 'kk-anti-reptile', version: '1.0.0-RELEASE'
	// https://mvnrepository.com/artifact/com.belerweb/pinyin4j
	implementation group: 'com.belerweb', name: 'pinyin4j', version: '2.5.1'
	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-websocket
	implementation 'org.springframework.boot:spring-boot-starter-websocket:2.5.5'
	//https://mvnrepository.com/artifact/org.java-websocket/Java-WebSocket
	//implementation 'org.java-websocket:Java-WebSocket:1.3.0'
	// https://mvnrepository.com/artifact/org.java-websocket/Java-WebSocket
	implementation 'org.java-websocket:Java-WebSocket:1.5.1'
	//https://github.com/auth0/java-jwt
	// 添加jwt
	implementation 'com.auth0:java-jwt:3.18.2'
	// https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter
	implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: '1.2.9'
	// https://mvnrepository.com/artifact/junit/junit
	testImplementation group: 'junit', name: 'junit', version: '4.13.2'


	//wxpay
	// https://mvnrepository.com/artifact/com.github.wxpay/wxpay-sdk
	//implementation group: 'com.github.wxpay', name: 'wxpay-sdk', version: '0.0.3'

	implementation 'com.github.wechatpay-apiv3:wechatpay-apache-httpclient:0.4.7'

	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor
	implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '2.6.8'

	// https://mvnrepository.com/artifact/com.google.code.gson/gson
	implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'

	// https://mvnrepository.com/artifact/cn.hutool/hutool-all
	implementation group: 'cn.hutool', name: 'hutool-all', version: '5.7.18'

	//redis
	// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis
	implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: '2.6.3'



}

test {
	useJUnitPlatform()
}

def getNewVersion(){
	return new Date().format("yyyyMMddHHmmss",TimeZone.getTimeZone("GMT+08:00"))
}