-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
101 lines (91 loc) · 2.29 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
94
95
96
97
98
99
100
101
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.16'
id 'maven-publish'
}
intellij {
sandboxDirectory "${ System.properties['user.home'] }/.idea-sandbox"
type 'IC'
version '2018.3'
}
compileJava {
options.compilerArgs << '-parameters'
}
group 'saker.build'
if (project.findProperty("projVersion")?.trim()) {
project.version = project.findProperty("projVersion")
} else {
project.version = '0.8.15'
}
sourceCompatibility = 1.8
publishing {
repositories {
mavenCentral()
mavenLocal()
}
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
sourceSets {
main {
java {
srcDirs 'src/main/java'
}
}
pluginImpl {
java {
srcDirs = ['src/impl/java']
compileClasspath += main.output
compileClasspath += main.compileClasspath
}
}
}
jar {
manifest {
attributes (
"Nest-Bundle-Format-Version" : "1",
"Nest-Bundle-Identifier" : "saker.build.ide.intellij-v" + project.version,
"Nest-Bundle-Source": "saker.build.ide.intellij-sources-v" + project.version
)
}
dependsOn pluginImplClasses
into('impl') {
from sourceSets.pluginImpl.java.outputDir
rename("(.*)", '$1_x')
}
archiveName("saker.build.ide.intellij-v" + project.version + ".jar")
}
task sourcesJar(type: Jar) {
dependsOn patchPluginXml
classifier = 'sources'
from sourceSets.main.java.srcDirs
from sourceSets.pluginImpl.java.srcDirs
into 'META-INF', {
from patchPluginXml.destinationDir
}
manifest {
attributes (
"Nest-Bundle-Format-Version" : "1",
"Nest-Bundle-Identifier" : "saker.build.ide.intellij-sources-v" + project.version
)
}
archiveName("saker.build.ide.intellij-sources-v" + project.version + ".jar")
}
configurations {
pluginImpl.extendsFrom compile
}
dependencies {
pluginImplCompileOnly files('src/main/resources/saker.build.jar')
pluginImplCompileOnly files('src/main/resources/saker.build-ide.jar')
//testCompile group: 'junit', name: 'junit', version: '4.12'
}
patchPluginXml {
untilBuild null
sinceBuild null
}
verifyPlugin {
ignoreWarnings = false
}