forked from codota/tabnine-intellij
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
93 lines (76 loc) · 2.24 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
plugins {
id 'java'
id "org.jetbrains.kotlin.jvm" version "1.4.32"
id 'org.jetbrains.intellij' version '1.2.0'
id 'org.jlleitschuh.gradle.ktlint' version "10.0.0"
id 'org.jlleitschuh.gradle.ktlint-idea' version "10.0.0"
}
group 'com.tabnine'
version project.hasProperty('externalVersion') ? project.externalVersion : '0.5.9'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
repositories {
mavenCentral()
}
apply plugin: "org.jlleitschuh.gradle.ktlint-idea"
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32")
testImplementation "org.hamcrest:hamcrest:2.2"
testImplementation "org.mockito:mockito-core:3.12.+"
testImplementation "org.mockito:mockito-inline:3.5.+"
testImplementation "org.mockito:mockito-junit-jupiter:3.12.+"
testImplementation "com.github.tomakehurst:wiremock-jre8:2.27.2"
testImplementation "io.mockk:mockk:1.11.0"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.8.1"
}
test {
useJUnitPlatform()
reports {
junitXml.enabled = true
}
}
intellij {
version = '2019.3'
type = 'IC'
updateSinceUntilBuild = false
}
def PRODUCTION_CHANNEL = null
def channelName = project.hasProperty('channel') ? project.channel : 'alpha'
def publishChannel = channelName == "production" ? PRODUCTION_CHANNEL : channelName
sourceSets {
main {
java.srcDirs += "channels/${channelName}"
}
}
def hubToken = project.hasProperty('hubToken') ? hubToken : (System.getenv('HUB_TOKEN'))
publishPlugin {
if (publishChannel != PRODUCTION_CHANNEL) {
channels = [publishChannel]
}
token = hubToken
}
tasks.create("currentVersion") {
doLast {
println version
}
}
tasks.getByName("runIde").configure {
if (project.hasProperty('logFilePath')) {
systemProperty("TABNINE_LOG_FILE_PATH", logFilePath)
}
}
tasks {
build {
dependsOn(addKtlintFormatGitPreCommitHook)
}
compileKotlin {
dependsOn(ktlintFormat)
}
}