Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
58 lines (47 loc) · 1.4 KB
/
Copy pathbuild.gradle
File metadata and controls
58 lines (47 loc) · 1.4 KB
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
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.6.3'
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
}
group 'com.itkacher.okhttpprofiler'
version '1.0.17'
repositories {
mavenCentral()
jcenter()
}
if (!hasProperty('StudioCompilePath')) {
throw new GradleException("No StudioCompilePath value was set, please create gradle.properties file")
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.7'
testCompile group: 'junit', name: 'junit', version: '4.12'
compileOnly fileTree(dir: "$StudioCompilePath/plugins/android/lib", include: ['*.jar'])
compileOnly fileTree(dir: "$StudioCompilePath/lib", include: ['*.jar'])
}
intellij {
pluginName 'OkHttpProfiler'
updateSinceUntilBuild false
plugins 'android'
intellij.localPath = project.hasProperty("StudioRunPath") ? StudioRunPath : StudioCompilePath
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
patchPluginXml {
changeNotes """
Maven migration.<br>
"""
}
task(verifySetup) {
doLast {
def ideaJar = "$StudioCompilePath/lib/idea.jar"
if (!file(ideaJar).exists()) {
throw new GradleException("$ideaJar not found, set StudioCompilePath in gradle.properties")
}
}
}
compileJava.dependsOn verifySetup