44 lines
1.4 KiB
Groovy
Executable File
44 lines
1.4 KiB
Groovy
Executable File
plugins {
|
|
id 'java'
|
|
id "org.jetbrains.kotlin.jvm" version "2.1.0"
|
|
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.10.1'
|
|
implementation 'com.google.code.gson:gson:2.11.0'
|
|
//for yaml 1.1, 1.32 limit maxsize 3M
|
|
implementation 'org.yaml:snakeyaml:2.2'
|
|
//mmdb格式
|
|
implementation 'com.maxmind.geoip2:geoip2:4.2.1'
|
|
//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"
|
|
|
|
// https://mvnrepository.com/artifact/org.jsoup/jsoup
|
|
implementation 'org.jsoup:jsoup:1.18.3'
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
|
|
}
|
|
|
|
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
|
|
""" |