Skip to content

Commit 13d2b21

Browse files
committed
Add up-to-date checks for gradle tasks to improve build speed
1 parent 817cf16 commit 13d2b21

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.idea/saveactions_settings.xml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jar {
5151
manifest {
5252
attributes 'Main-Class': 'com.airsquared.blobsaver.Main'
5353
}
54+
jar.enabled = false
5455
jar.finalizedBy shadowJar // make shadowJar always overwrite the jar task
5556
}
5657

@@ -62,7 +63,6 @@ shadowJar {
6263
"**/darwin/*", "**/win32-x86/*", "**/win32-x86-64/*", "**/openbsd-x86/*", "**/openbsd-x86-64/*",
6364
"**/freebsd-x86/*", "**/freebsd-x86-64/*", "**/sunos-sparc/*", "**/sunos-sparcv9/*", "**/sunos-x86/*", "**/sunos-x86-64/*"
6465
includeEmptyDirs = false
65-
jar.group = "other"
6666
}
6767

6868
macAppBundle {
@@ -78,6 +78,11 @@ macAppBundle {
7878
}
7979

8080
task copyFilesIntoMacApp(dependsOn: createApp) {
81+
inputs.files(createApp.outputs)
82+
inputs.dir("${projectDir}/dist/macos")
83+
inputs.files("${projectDir}/LICENSE", "${projectDir}/libraries_used.txt")
84+
outputs.dir("${buildDir}/macApp/blobsaver.app")
85+
8186
doFirst {
8287
copy {
8388
from "${projectDir}/dist/macos/Frameworks"
@@ -97,6 +102,11 @@ task copyFilesIntoMacApp(dependsOn: createApp) {
97102
}
98103

99104
task createLinuxTargz(type: Tar, dependsOn: shadowJar) {
105+
inputs.files(shadowJar.outputs)
106+
inputs.file("${buildDir}/libs/blobsaver.jar")
107+
inputs.dir("${projectDir}/dist/linux/")
108+
outputs.file("${buildDir}/distributions/blobsaver-linux.tar.gz")
109+
100110
archiveFileName = "blobsaver-linux.tar.gz"
101111
destinationDirectory = file("${buildDir}/distributions/")
102112
from "${buildDir}/libs/blobsaver.jar", "${projectDir}/dist/linux/"
@@ -115,14 +125,18 @@ launch4j { // Windows only, don't use this, use createWindowsInstaller
115125
createExe.dependsOn shadowJar
116126
}
117127

128+
// IMPORTANT: first make sure you have installed Inno Setup
129+
// Install Inno Setup Preprocessor (ISPP) along with Inno Setup
130+
// and make sure you have wine in your path if you are not on windows
131+
// Inno Setup **MUST** be installed to C:\Program Files (x86)\Inno Setup 5\
118132
// if your platform isn't Windows, "wine" is required to run this task
119133
task createWindowsInstaller(dependsOn: createExe) {
120-
// IMPORTANT: first make sure you have installed Inno Setup
121-
// Install Inno Setup Preprocessor (ISPP) along with Inno Setup
122-
// and make sure you have wine in your path if you are not on windows
123-
// Inno Setup **MUST** be installed to C:\Program Files (x86)\Inno Setup 5\
134+
inputs.files(createExe.outputs)
135+
inputs.dir("${projectDir}/dist/windows/")
136+
inputs.file("${buildDir}/launch4j/blobsaver.exe")
137+
outputs.file("${buildDir}/distributions/blobsaver-windows.exe")
138+
124139
doFirst {
125-
delete "${buildDir}/launch4j/lib"
126140
copy {
127141
from "${projectDir}/dist/windows/", "${buildDir}/launch4j/blobsaver.exe"
128142
into "${buildDir}/tmp/innosetup/"

0 commit comments

Comments
 (0)