forked from VladRassokhin/terraform-metadata
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
60 lines (53 loc) · 1.44 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
plugins {
}
apply plugin: 'java'
apply plugin: 'maven-publish'
group = 'org.intellij.plugins.hcl.terraform'
def versionPrefix = '0.2'
boolean isSnapshot = true
if (System.getProperty('build.number') != null) {
version = "${versionPrefix}.${System.getProperty('build.number')}"
isSnapshot = false
} else {
version = "${versionPrefix}.SNAPSHOT"
isSnapshot = true
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
processResources {
doLast {
if (!isSnapshot) {
print "${outputs.files.asPath}"
fileTree(dir: outputs.files.asPath, include: '**/*.json').each {
file -> file.text = groovy.json.JsonOutput.toJson(new groovy.json.JsonSlurper().parse(file))
}
}
}
}
sourceSets.main.resources { srcDir 'terraform' }
jar {
includeEmptyDirs false
eachFile { details ->
details.path = "terraform/$details.path"
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.archivesBaseName
version = project.version
suppressAllPomMetadataWarnings()
}
}
repositories {
maven {
url "https://packages.jetbrains.team/maven/p/ij/intellij-dependencies"
credentials {
username = "$space_username"
password = "$space_password"
}
}
}
}