blob: e8104d00574ac877fb2f468a429fe5d08ccb16c5 (
plain)
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
|
import proguard.gradle.ProGuardTask
buildscript {
dependencies {
classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:$gradle_intellij_plugin_version"
classpath "net.sf.proguard:proguard-gradle:5.3.3"
}
}
apply plugin: 'org.jetbrains.intellij'
{ ->
intellij {
version = ideaVersion
instrumentCode = false
configureDefaultDependencies = false
}
["patchPluginXml", "prepareSandbox", "prepareTestingSandbox",
"verifyPlugin", "runIde", "buildPlugin", "publishPlugin"].each {
tasks.remove(tasks.findByName(it))
}
}()
configurations {
proguardInput
proguardOut
}
afterEvaluate {
dependencies {
proguardInput intellij { include("idea.jar") }
}
}
task strip(type: ProGuardTask) {
configuration file('ideaJar.pro')
afterEvaluate {
injars configurations.proguardInput.files, filter: "**.class"
outjars file("$buildDir/idea-stripped.jar")
}
}
afterEvaluate {
artifacts {
proguardOut(strip.outputs.files.singleFile) {
builtBy strip
}
}
}
|