-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
106 lines (91 loc) · 2.94 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
97
98
99
100
101
102
103
104
105
106
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'tech.yanand.maven-central-publish' version '1.1.1'
}
group = 'tech.yanand'
version = '1.0.2'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.mybatis:mybatis:3.5.16'
implementation 'org.mybatis:mybatis-spring:3.0.3'
implementation 'org.springframework:spring-tx:6.1.8'
implementation 'org.slf4j:slf4j-api:2.0.13'
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.2.6'
testRuntimeOnly 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3'
testRuntimeOnly 'org.hsqldb:hsqldb:2.7.3'
}
java {
sourceCompatibility = '17'
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Flying Mybatis'
description = 'Let Mybatis fly, provide some basic CRUD methods by simply inheriting `AutoMapper`, ' +
'without losing any of the original Mybatis Spring functionally.'
url = 'https://github.com/yananhub/flying-mybatis'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'yananhub'
name = 'Richard Zhang'
email = 'yanandwy@163.com'
}
}
scm {
connection = 'scm:git:https://github.com/yananhub/flying-mybatis.git'
developerConnection = 'scm:git:https://github.com/yananhub/flying-mybatis.git'
url = 'https://github.com/yananhub/flying-mybatis'
}
}
}
}
repositories {
maven {
name = "Local"
url = layout.buildDirectory.dir('repos/bundles')
}
}
}
signing {
if (System.getenv('SIGNING_KEY')) {
def signingKey = System.getenv('SIGNING_KEY').replace('\\n', '\n')
def signingPassword = System.getenv('SIGNING_PASSWORD')
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
}
javadoc {
source = fileTree('src/main/java') {
exclude 'tech/yanand/flyingmybatis/AutoMapperProvider.java'
}
options.addBooleanOption('html5', true)
}
mavenCentral {
repoDir = layout.buildDirectory.dir('repos/bundles')
authToken = System.getenv('MAVEN_UPLOAD_TOKEN')
}