-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
132 lines (113 loc) · 3.54 KB
/
build.gradle
File metadata and controls
132 lines (113 loc) · 3.54 KB
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
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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'signing'
id "com.vanniktech.maven.publish" version "0.34.0"
}
apply plugin: 'jacoco'
group 'io.github.xbeeant'
archivesBaseName = "java-merger"
version '1.0.0'
repositories {
maven {
url "https://maven.aliyun.com/repository/public"
}
maven {
url "https://maven.aliyun.com/repository/jcenter"
}
maven {
url "https://maven.aliyun.com/repository/spring"
}
maven {
url "https://maven.aliyun.com/repository/spring-plugin"
}
maven {
url "https://maven.aliyun.com/repository/gradle-plugin"
}
maven {
url "https://maven.aliyun.com/repository/google"
}
maven {
url "https://maven.aliyun.com/repository/grails-core"
}
maven {
url "https://maven.aliyun.com/repository/apache-snapshots"
}
mavenCentral()
mavenLocal()
}
ext {
jacksonVersion = '2.19.2'
}
dependencies {
testImplementation(platform('org.junit:junit-bom:5.13.4'))
testImplementation('org.junit.jupiter:junit-jupiter')
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'com.github.javaparser:javaparser-core:3.27.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jacksonVersion
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jacksonVersion
// 引入XML功能
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: jacksonVersion
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.17'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.25.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.25.1'
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar() // Gradle 6.8+ 推荐方式生成 sources jar
// withJavadocJar() // Gradle 6.8+ 推荐方式,但对 Kotlin 项目 Dokka 更好
}
signing {
sign configurations.archives
}
mavenPublishing {
coordinates("io.github.xbeeant", "java-merger", "1.0.0")
pom {
name = 'java-merge'
description = '使用 javaparser 对java代码进行合并'
inceptionYear = "2025"
url = 'https://github.com/xbeeant/java-code-merger'
licenses {
license {
name = "MIT License"
url = "https://mit-license.org/"
}
}
developers {
developer {
id = "beeant0512"
name = "Xiaobiao Huang"
email = "huangxb0512@gmail.com"
url = "https://beeant0512.github.io/"
}
}
scm {
url = "https://github.com/xbeeant/java-code-merger"
connection = "scm:git:git://xbeeant/java-code-merger.git"
developerConnection = "scm:git:ssh://git@xbeeant/java-code-merger.git"
}
}
}
test {
useJUnitPlatform()
}
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
options {
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
tags "date"
}
}