forked from caijianying/ShowRuntimeClass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
135 lines (111 loc) · 3.33 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
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
133
134
135
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.17.1'
id 'distribution'
}
apply from: 'config.gradle'
group 'com.xiaobaicai.plugin'
version "$rootProject.ext.plugin.version"
//sourceCompatibility = 21
//targetCompatibility = 21
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation project(":plugin-core")
implementation project(path: ':plugin-agent', configuration: 'shadow')
implementation rootProject.ext.dependencies["hutool-all"]
annotationProcessor rootProject.ext.dependencies["lombok"]
compileOnly rootProject.ext.dependencies["lombok"]
testAnnotationProcessor rootProject.ext.dependencies["lombok"]
testCompileOnly rootProject.ext.dependencies["lombok"]
// 单测
testCompileOnly rootProject.ext.dependencies["junit"]
testImplementation rootProject.ext.dependencies["junit.jupiter.api"]
testImplementation rootProject.ext.dependencies["junit.jupiter.engine"]
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = '2024.2'
plugins = ['java']
type.set("IU")
// localPath.set("/Users/jinghong/Applications/IntelliJ IDEA Ultimate.app")
tasks {
"buildSearchableOptions" {
enabled = false
}
}
}
runIde {
jvmArgs "-javaagent:/Users/jinghong/java/ja-netfilter/ja-netfilter.jar",
"--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
"--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED"
}
patchPluginXml {
patchPluginXml {
sinceBuild.set("241.1")
untilBuild.set("")
}
}
publishPlugin {
token = System.getenv("pluginToken")
}
runIde {
jvmArgs '--add-exports', 'java.base/jdk.internal.vm=ALL-UNNAMED'
}
test {
useJUnitPlatform()
}
//所有项目配置
allprojects {
group 'com.xiaobaicai.plugin'
version "$rootProject.ext.plugin.version"
apply plugin: 'idea'
apply plugin: 'java'
// sourceCompatibility = 21
// targetCompatibility = 21
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
}
//所有子项目的通用配置
subprojects {
//仓库地址
repositories {
mavenLocal()
mavenCentral()
}
//公用依赖
dependencies {
// 全局依赖
implementation rootProject.ext.dependencies["hutool-all"]
implementation rootProject.ext.dependencies["byte-buddy"]
implementation rootProject.ext.dependencies["byte-buddy-agent"]
implementation rootProject.ext.dependencies["slf4j"]
annotationProcessor rootProject.ext.dependencies["lombok"]
compileOnly rootProject.ext.dependencies["lombok"]
testAnnotationProcessor rootProject.ext.dependencies["lombok"]
testCompileOnly rootProject.ext.dependencies["lombok"]
// 单测
testCompileOnly rootProject.ext.dependencies["junit"]
testImplementation rootProject.ext.dependencies["junit.jupiter.api"]
testImplementation rootProject.ext.dependencies["junit.jupiter.engine"]
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}
//task packAllTwice() {
// dependsOn(':plugin-agent:packAgent')
// dependsOn(':assemble')
//}