forked from blackducksoftware/synopsys-detect-scripts
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
66 lines (51 loc) · 1.96 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
buildscript {
apply from: 'https://raw.githubusercontent.com/blackducksoftware/integration-resources/master/gradle_common/buildscript-repositories.gradle', to: buildscript
apply from: 'https://raw.githubusercontent.com/blackducksoftware/integration-resources/master/gradle_common/buildscript-cgp-version.gradle'
ext {
javaTargetCompatibility = 8
javaSourceCompatibility = 8
}
dependencies {
classpath "com.blackduck.integration:common-gradle-plugin:${managedCgpVersion}"
classpath 'com.blackduck.integration:integration-rest:11.0.0'
classpath 'org.codehaus.groovy:groovy-all:2.4.12'
classpath 'org.junit.jupiter:junit-jupiter:5.4.2'
classpath 'org.mockito:mockito-core:2.+'
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '5.0.0'
}
def internalRepoHost = System.getenv('SNPS_INTERNAL_ARTIFACTORY')
apply from: 'https://raw.githubusercontent.com/blackducksoftware/integration-resources/master/gradle_common/buildscript-repositories.gradle'
repositories {
maven { url "${internalRepoHost}/artifactory/jcenter" }
}
group = 'com.blackduck.integration'
version = '3.3.0-SNAPSHOT'
apply plugin: 'com.blackduck.integration.simple'
jar {
manifest {
attributes 'Main-Class': 'com.blackduck.integration.detect.scripts.Application'
}
}
shadowJar {
getArchiveBaseName().set('detect-scripts')
classifier = null
}
jar.finalizedBy shadowJar
build.dependsOn.add("generateVersionFile")
build.dependsOn.add("generateScripts")
task generateVersionFile {
final File versionFile = new File(project.projectDir, "src/main/resources/version.txt")
versionFile.delete()
versionFile << version
}
task generateScripts(type: JavaExec) {
main = "-jar"
args(jar.getArchiveFile().get().asFile, "scripts", "${project.buildDir}/libs/")
}
dependencies {
implementation 'com.blackduck.integration:blackduck-common:67.0.1'
implementation 'org.freemarker:freemarker:2.3.31'
}