-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.gradle
86 lines (72 loc) · 2.13 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
buildscript {
ext.kotlinVersion = '1.8.10'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.15.0'
id 'org.jetbrains.kotlin.jvm' version '1.8.10'
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
intellij {
version = '2023.1.4'
plugins = ['Kotlin', 'java']
pluginName = 'kotlin-fill-class'
updateSinceUntilBuild = false
publishPlugin {
token = System.getenv('TOKEN')
}
patchPluginXml {
sinceBuild = '221.5080.210'
}
}
group 'com.github.suusan2go.kotlin-fill-class'
version '1.0.23'
repositories {
mavenCentral()
}
configurations {
ktlint
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
// Lorem : An extremely useful Lorem Ipsum generator for Java!
implementation 'com.thedeanda:lorem:2.1'
testImplementation 'junit:junit:4.13.1'
testImplementation 'io.mockk:mockk:1.13.4'
ktlint('com.pinterest:ktlint:0.48.2') {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))
}
}
}
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
mainClass.set("com.pinterest.ktlint.Main")
args "src/**/*.kt"
// to generate report in checkstyle format prepend following args:
// "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/ktlint.xml"
// to add a baseline to check against prepend following args:
// "--baseline=ktlint-baseline.xml"
// see https://github.com/pinterest/ktlint#usage for more
}
check.dependsOn ktlint
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
mainClass.set("com.pinterest.ktlint.Main")
args "-F", "src/**/*.kt"
}