-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
96 lines (80 loc) · 2.26 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
apply plugin: 'java-library'
apply plugin: 'com.vanniktech.maven.publish'
apply plugin: 'signing'
// 编译脚本
buildscript {
ext {
mybatisPlusVersion = "3.5.9"
solonVersion = "3.0.1"
}
// 仓库配置
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/google' }
mavenCentral()
}
dependencies {
classpath("com.vanniktech:gradle-maven-publish-plugin:0.29.0")
}
}
group APP_GROUP
version APP_VERSION
description = "MybatisPlus Solon Plugin"
// 仓库配置
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
mavenCentral()
}
// 依赖配置
dependencies {
api("com.baomidou:mybatis-plus-extension:${mybatisPlusVersion}")
api("org.noear:mybatis-solon-plugin:${solonVersion}")
api("org.noear:solon-aot:${solonVersion}")
testImplementation("org.noear:solon-test:${solonVersion}")
testImplementation("io.github.classgraph:classgraph:4.8.176")
testImplementation("com.zaxxer:HikariCP:4.0.3")
}
// 编译环境 JDK-1.8+
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.named('test') {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:-serial"
options.encoding = 'UTF-8'
options.warnings = false
options.deprecation = true
options.compilerArgs += ["-parameters"]
}
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}
tasks.register('sourcesJar', Jar) {
dependsOn classes
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
options {
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
failOnError false
links "https://docs.oracle.com/javase/8/docs/api"
}
}
tasks.withType(MavenPublication).configureEach {
doFirst {
options.skipCertificateChecks = true
}
}
tasks.register('javadocJar', Jar) {
archiveClassifier = 'javadoc'
from javadoc
}