Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions pretixscan/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
group 'eu.pretix.pretixscan'
version = project.properties['version']
project.version version

import org.gradle.internal.os.OperatingSystem
apply from: 'libpretixsync-repo/libpretixsync/versions.gradle'

ext {
operatingSystem = OperatingSystem.current()
}

repositories {
jcenter()
mavenCentral()
}

buildscript {
repositories {
jcenter()
Expand All @@ -27,14 +11,29 @@ buildscript {
classpath "net.ltgt.gradle:gradle-apt-plugin:0.17"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
classpath "net.ltgt.gradle:gradle-apt-plugin:0.17"

no longer needed in newer gradle versions :)

classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.2'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
classpath 'org.openjfx:javafx-plugin:0.0.7'
}
}
plugins {
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.9.23' apply false
id 'org.jetbrains.kotlin.kapt' version '1.9.23' apply false
}

group 'eu.pretix.pretixscan'
version = project.properties['version']
project.version version

import org.gradle.internal.os.OperatingSystem
apply from: 'libpretixsync-repo/libpretixsync/versions.gradle'

apply plugin: 'base'
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'
apply plugin: 'net.ltgt.apt-idea'
ext {
operatingSystem = OperatingSystem.current()
}

repositories {
jcenter()
mavenCentral()
}

subprojects {
apply plugin: 'java'
Expand Down
Binary file modified pretixscan/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion pretixscan/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 16 additions & 19 deletions pretixscan/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pretixscan/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions pretixscan/gui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
*/
import org.apache.tools.ant.filters.*

apply plugin: 'application'
apply plugin: 'org.openjfx.javafxplugin'
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
}
apply from: '../libpretixsync-repo/libpretixsync/versions.gradle'

mainClassName = "eu.pretix.pretixscan.desktop.PretixScanMain"
Expand Down Expand Up @@ -71,15 +73,15 @@ dependencies {
implementation(project(':libpretixprint')) {
transitive = false
}
testCompile group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'junit', name: 'junit', version: '4.12'

javafxCompile "org.openjfx:javafx-base:11.0.2:${platform}"
javafxCompile "org.openjfx:javafx-graphics:11.0.2:${platform}"
javafxCompile "org.openjfx:javafx-controls:11.0.2:${platform}"
javafxCompile "org.openjfx:javafx-fxml:11.0.2:${platform}"
javafxCompile "org.openjfx:javafx-swing:11.0.2:${platform}"
implementation "org.openjfx:javafx-base:11.0.2:${platform}"
implementation "org.openjfx:javafx-graphics:11.0.2:${platform}"
implementation "org.openjfx:javafx-controls:11.0.2:${platform}"
implementation "org.openjfx:javafx-fxml:11.0.2:${platform}"
implementation "org.openjfx:javafx-swing:11.0.2:${platform}"

compileOnly configurations.javafxCompile
//compileOnly configurations.javafxCompile
}

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -107,5 +109,6 @@ javafx {
modules = [
'javafx.controls', 'javafx.fxml', 'javafx.graphics', 'javafx.swing'
]
configurations = [ 'implementation', 'testImplementation' ]
version = '11.0.2'
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,10 @@ fun getBadgeLayout(application: PretixScanMain, position: JSONObject, eventSlug:
}
}

/* Legacy mechanism: Keep around until pretix 2.5 is end of life */
val item = application.data().select(Item::class.java)
.where(Item.SERVER_ID.eq(itemid_server))
.get().firstOrNull() ?: return getDefaultBadgeLayout()
if (item.getBadge_layout_id() != null) {
return application.data().select(BadgeLayout::class.java)
.where(BadgeLayout.SERVER_ID.eq(item.getBadge_layout_id()))
.and(BadgeLayout.EVENT_SLUG.eq(eventSlug))
.get().firstOrNull() ?: getDefaultBadgeLayout()
} else { // Also used for current pretix versions for obtaining the event's default badge layout
return application.data().select(BadgeLayout::class.java)
.where(BadgeLayout.IS_DEFAULT.eq(true))
.and(BadgeLayout.EVENT_SLUG.eq(eventSlug))
.get().firstOrNull() ?: getDefaultBadgeLayout()
}
return application.data().select(BadgeLayout::class.java)
.where(BadgeLayout.IS_DEFAULT.eq(true))
.and(BadgeLayout.EVENT_SLUG.eq(eventSlug))
.get().firstOrNull() ?: getDefaultBadgeLayout()
}

fun printBadge(application: PretixScanMain, position: JSONObject, eventSlug: String) {
Expand Down
4 changes: 2 additions & 2 deletions pretixscan/packaging/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ task recreateIcons(dependsOn: [recreateIconMacApp, recreateIconWindowsApp]) {
}

dependencies {
compile project(':gui')
implementation project(':gui')
}

task copyDependencies(type: Copy) {
from configurations.runtime
//from configurations.runtime
into "${buildDir}/libraries"
}

Expand Down