Skip to content

Commit

Permalink
Fixed old jar deletion
Browse files Browse the repository at this point in the history
Signed-off-by: David Kaan <dak@bankdata.dk>
  • Loading branch information
David Kaan committed Sep 22, 2022
1 parent cecec6c commit ea97575
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,15 @@ def integrationTest = tasks.register("integrationTest", Test) {
}
}

task clearLibJar(type: Delete) {
delete fileTree(dir:'build/libs', include: '**.jar')
}

task fatJar(type: Jar) {
// archiveFileName "${productName}-${productVersion}.jar"
archiveName "${productName}-${productVersion}.jar"
description 'Create executable jar'
dependsOn integrationTest
dependsOn integrationTest, clearLibJar
manifest {
attributes 'Main-Class': "${mainClassName}",
'Implementation-Title': 'Gradle Quickstart',
Expand All @@ -135,10 +139,6 @@ task fatJar(type: Jar) {
with jar
}

task clearJar(type: Delete) {
delete(files("${project.buildDir}/vs code extension/Cobol-check/bin/"))
}

task copyJarToBin(type: Copy) {
description 'Copy executable jar to bin directory prior to distribution'
dependsOn fatJar
Expand All @@ -147,9 +147,13 @@ task copyJarToBin(type: Copy) {
into 'bin/'
}

task clearExtensionJar(type: Delete) {
delete fileTree(dir:'vs code extension/Cobol-check/bin', include: '**.jar')
}

task copyJarToExtension(type: Copy) {
description 'Copy executable jar to bin and VS Code extension bin directories prior to distribution'
dependsOn clearJar, fatJar
dependsOn clearExtensionJar, fatJar
from('build/libs/')
include '**/*.jar'
into 'vs code extension/Cobol-check/bin/'
Expand Down

0 comments on commit ea97575

Please sign in to comment.