-
-
Notifications
You must be signed in to change notification settings - Fork 206
/
build.gradle
40 lines (37 loc) · 1.27 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
plugins {
id 'java'
id "org.jetbrains.kotlin.jvm" version "1.9.23"
id "com.diffplug.spotless" version "6.25.0"
id "io.gitlab.arturbosch.detekt" version "1.23.6"
}
group 'me.leon'
version '1.3.0'
dependencies {
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:1.23.6"
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
implementation 'com.google.code.gson:gson:2.10.1'
//for yaml 1.1, 1.32 limit maxsize 3M
implementation 'org.yaml:snakeyaml:2.2'
//mmdb格式
implementation 'com.maxmind.geoip2:geoip2:4.2.0'
//dat格式
// implementation 'com.maxmind.geoip:geoip-api:1.3.1'
// implementation 'com.maxmind.db:maxmind-db:1.2.0'
//for yaml 1.2
// implementation "org.snakeyaml:snakeyaml-engine:2.3"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
}
test {
useJUnitPlatform()
}
apply from: "$rootProject.projectDir/config/codeQuality.gradle"
def hook = new File("$rootProject.projectDir/.git/hooks/pre-commit")
hook.parentFile.mkdirs()
hook.text = """#!/bin/bash
echo "run code format"
./gradlew spotlessCheck
echo "run code smell check"
./gradlew detekt
"""