-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
188 lines (163 loc) · 8.79 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.17.0'
id 'com.palantir.git-version' version '0.14.0'
}
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
group 'org.videobug'
version '2024.1.4-' + getGitHash()
compileJava {
sourceCompatibility = '11'
targetCompatibility = '11'
}
repositories {
mavenCentral()
maven {
url 'https://gitlab.com/api/v4/projects/35360521/packages/maven'
name "GitLab"
credentials(HttpHeaderCredentials) {
name = 'Private-Token'
value = gitLabPrivateToken
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
task createProperties() {
doLast {
def details = versionDetails()
new File("$rootDir/src/main/resources/version.properties").withWriter { w ->
Properties p = new Properties()
p['version'] = project.version.toString()
p['gitLastTag'] = details.lastTag
p['gitCommitDistance'] = details.commitDistance.toString()
p['gitHash'] = details.gitHash.toString()
p['gitHashFull'] = details.gitHashFull.toString() // full 40-character Git commit hash
// p['gitBranchName'] = details.branchName // is null if the repository in detached HEAD mode
p['gitIsCleanTag'] = details.isCleanTag.toString()
p.store w, null
}
// copy needed, otherwise the bean VersionController can't load the file at startup when running complete-app tests.
// copy {
// from "$rootDir/src/main/resources/version.properties"
// into "bin/main/"
// }
}
}
classes {
dependsOn createProperties
}
runIde {
autoReloadPlugins = true
jvmArgs = [
"--add-opens=java.base/java.util=ALL-UNNAMED",
"-Xmx1G",
"--add-exports",
"java.base/jdk.internal.vm=ALL-UNNAMED",
// "-XX:FlightRecorderOptions=stackdepth=100"
]
}
task postBuildPlugin(type: Exec) {
// auto picks version of plugin
environment('PLUGIN_VERSION', version)
commandLine './post-build-plugin.sh'
}
// runs postbuild automatically after build plugin
postBuildPlugin.dependsOn buildPlugin
buildPlugin.finalizedBy postBuildPlugin
dependencies {
implementation 'video.bug:common:1.4.7'
// implementation files("/Users/artpar/.m2/repository/video/bug/common/1.4.7/common-1.4.7.jar")
implementation 'org.slf4j:slf4j-api:2.0.3'
implementation 'net.openhft:chronicle-map:3.22.9'
implementation 'net.openhft:chronicle-queue:5.22.28'
implementation 'org.json:json:20201115'
implementation 'com.amplitude:java-sdk:1.12.0'
implementation 'com.squareup:javapoet:1.13.0'
implementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
implementation 'org.apache.logging.log4j:log4j-api:2.17.2'
implementation 'org.apache.logging.log4j:log4j-core:2.17.2'
implementation 'com.github.javaparser:javaparser-core:3.24.8'
// implementation 'com.github.javafaker:javafaker:1.0.2'
implementation 'io.minio:minio:8.4.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testImplementation 'org.mockito:mockito-core:4.0.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
// implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2'
implementation group: 'com.j256.ormlite', name: 'ormlite-jdbc', version: '6.1'
implementation group: 'com.j256.ormlite', name: 'ormlite-core', version: '6.1'
implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.39.3.0'
implementation group: 'org.apache.poi', name: 'poi', version: '5.2.2'
implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.2.2'
implementation 'com.googlecode.cqengine:cqengine:3.6.0'
implementation 'io.kaitai:kaitai-struct-runtime:0.9'
// implementation files("/Users/artpar/.m2/repository/video/bug/unlogged-sdk/0.1.33/unlogged-sdk-0.1.33.jar")
// annotationProcessor files("/Users/artpar/.m2/repository/video/bug/unlogged-sdk/0.1.33/unlogged-sdk-0.1.33.jar")
// implementation 'video.bug:unlogged-sdk:0.1.12'
// annotationProcessor 'video.bug:unlogged-sdk:0.1.12'
}
runPluginVerifier {
ideVersions = [
"IU-2021.3.3",
"IU-2022.3.3",
"IU-2023.1.5",
"IU-2023.2.5",
"IU-2023.3.1",
"IU-2023.3.2",
"IU-2023.3.3",
"IU-2023.3.4"
]
verificationReportsDir = "verificationReport"
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = '2024.1.1'
plugins = ['com.intellij.java', 'maven', 'gradle', 'org.jetbrains.kotlin']
updateSinceUntilBuild = false
sameSinceUntilBuild = true
// pluginDependencies = [
// { pluginId = "net.ashald.envfile" }
// ]
}
patchPluginXml {
changeNotes = """
<h3 id="release-notes-unlogged-io-s-latest-gem-a-10x-java-developer-s-dream-come-true">Release Notes: Unlogged.io's Latest Gem 💎 - A 10x Java Developer's Dream Come True</h3>
<h4 id="granular-performance-tracking-because-every-millisecond-counts-">Granular Performance Tracking: Because Every Millisecond Counts ⏱️</h4>
<p>Gone are the days when performance tracking was just a distant, API-level dream. With our newest spectacle, you can now see precisely what time each method takes, down to the most minuscule detail. It's like having a microscope for your code, but instead of looking at germs, you're watching your methods dance in real-time. Welcome to the future, where every millisecond is accounted for, and every performance hiccup is spotted faster than you can say "Java".</p>
<h4 id="ghost-icon-spookily-simple-mocking-">Ghost Icon: Spookily Simple Mocking 👻</h4>
<p>Clicking on our ghost icon allows you to mock db calls, API calls, Redis calls, downstream services, and file operations with the recorded data. Yes, you read that right. One click. No more wrestling with bloated containers that eat up your system resources like there's no tomorrow. It's so easy, it's almost scary. Our ghost icon is here to make your developer life a breeze, not to haunt your nightmares.</p>
<h4 id="save-replays-with-a-snap-auto-magical-assertions-">Save Replays with a Snap: Auto-Magical Assertions ✨</h4>
<p>Imagine saving replays of all methods at once, with a mere selection. That's not just imagination now; it's reality. Unlogged auto-defines assertions for you, because who has the time to manually do that? Not you, busy Java developers. Our platform automatically saves and maps mocks to replays, making your testing workflow smoother than a hot knife through butter.</p>
<h4 id="integration-or-unit-we-don-t-discriminate-test-your-heart-out-">Integration or Unit, We Don't Discriminate: Test Your Heart Out ❤️</h4>
<p>Run your replays in unit or integration mode using mvn test or ./gradlew test. Getting a test report has never been easier. It's like choosing between chocolate and vanilla — regardless of your pick, the outcome is sweet. With Unlogged, testing becomes less of a chore and more of a choice.</p>
<h4 id="commit-like-a-pro-replay-tests-at-your-fingertips-">Commit Like a Pro: Replay Tests at Your Fingertips 🏆</h4>
<p>The replay tests we create reside cozily inside the /test/resources/unlogged folder. This means you can commit and push these tests to your repo with the swagger of a cowboy at high noon. Show off your testing prowess and make your team members green with envy. Or better yet, share the love and let them in on the secret to your success.</p>
<h4 id="context-reading-because-we-care-about-the-details-">Context Reading: Because We Care About the Details 🔍</h4>
<p>Unlogged can now read the saved context for authentication and other headers, because we understand that the devil is in the details. No more manual tinkering or guessing games. It's like we've handed you the keys to the kingdom of efficiency.</p>
<p>Java development can sometimes feel like a battle, but Unlogged.io's latest release is the cavalry coming over the hill. </p>
<p>So saddle up, developers! With our tool, you're not just coding; you're crafting a masterpiece with the precision of a watchmaker and the vision of an artist. </p>
<p>Happy coding!
</p>
"""
}
publishPlugin {
token = "perm:c2hhcmR1bGxhdmVrYXI=.OTItOTgzNg==.jtYdVSDkwcwSWZMhCu5BVma7V3VRFY"
channels = ['alpha']
}
test {
useJUnitPlatform()
jvmArgs = [
"-Xmx1G"
]
}
//sourceCompatibility = JavaVersion.VERSION_17
//targetCompatibility = JavaVersion.VERSION_17