forked from Leon406/ToolsFx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
39 lines (33 loc) · 1.18 KB
/
build.gradle.kts
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
plugins {
kotlin("jvm") version "1.6.21"
id("com.diffplug.spotless") version "6.5.0"
id("io.gitlab.arturbosch.detekt") version "1.19.0"
id("org.openjfx.javafxplugin") version "0.0.13"
}
repositories {
mavenCentral()
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
maven { url = uri("https://maven.aliyun.com/repository/google") }
}
apply(from = "${rootProject.projectDir}/config/Versions.gradle.kts")
subprojects {
apply(from = "${rootProject.projectDir}/config/codeQuality.gradle")
apply(plugin = "org.openjfx.javafxplugin")
apply(plugin = "org.jetbrains.kotlin.jvm")
repositories {
mavenCentral()
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
maven { url = uri("https://maven.aliyun.com/repository/google") }
}
}
val hook = File("${rootProject.projectDir}/.git/hooks/pre-commit")
hook.writeBytes(
"""#!/bin/bash
echo "run code format"
./gradlew spotlessCheck
echo "run code smell check"
./gradlew detekt
""".toByteArray()
)