File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 3030
3131 - name : Gradle build
3232 working-directory : ./pretixscan
33- run : ./gradlew :composeApp:build -PappPackageName="pretixSCAN"
33+ run : ./gradlew :composeApp:build
Original file line number Diff line number Diff line change @@ -155,11 +155,10 @@ compose.desktop {
155155 nativeDistributions {
156156 // On Windows, we need the packageName to be set as 'pretixSCAN Desktop' in order to avoid a conflict with v1
157157
158- val requiredPackageName = findProperty(" appPackageName" )?.toString()
159- ? : throw GradleException (" Package name must be provided via -PappPackageName=<name>" )
158+ val packageNameValue = findProperty(" appPackageName" )?.toString() ? : " pretixSCAN-default"
160159
161160 targetFormats(TargetFormat .Dmg , TargetFormat .Msi , TargetFormat .Deb )
162- packageName = requiredPackageName
161+ packageName = packageNameValue
163162 packageVersion = version
164163 vendor = " pretix GmbH"
165164 copyright = " pretix.eu, Raphael Michel"
@@ -193,4 +192,13 @@ compose.desktop {
193192 }
194193 }
195194 }
195+ }
196+
197+ // Validate packageName is provided for packaging tasks
198+ tasks.matching { it.name.contains(" package" , ignoreCase = true ) }.configureEach {
199+ doFirst {
200+ if (findProperty(" appPackageName" ) == null ) {
201+ throw GradleException (" Package name must be provided via -PappPackageName=<name> for packaging tasks" )
202+ }
203+ }
196204}
You can’t perform that action at this time.
0 commit comments