Skip to content

Commit

Permalink
Upgrade Gradle and Kotlin version (#18)
Browse files Browse the repository at this point in the history
* Upgrade Gradle and Kotlin version

* Update libpretixsync to use merged kotlin/gradle-upgrade

* Add explicit dependency on libpretixsync for server jar

* Remove signature when building a fat jar

---------

Co-authored-by: Maximilian Richt <[email protected]>
  • Loading branch information
raphaelm and robbi5 authored Oct 29, 2024
1 parent 30868ae commit 6cc93c8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
strategy:
matrix:
java: [ '11', '17' ]
java: [ '17', '21' ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -35,4 +35,4 @@ jobs:
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
report_paths: '**/build/test-results/test/TEST-*.xml'
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Submodules
run: git submodule update --init
- name: Build
Expand Down
33 changes: 3 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.ltgt.gradle:gradle-apt-plugin:0.17"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.11"
}
plugins {
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 '1.0-SNAPSHOT'

apply plugin: 'base'
apply plugin: 'kotlin'
apply plugin: 'java'
apply plugin: 'kotlin-kapt'
apply plugin: 'net.ltgt.apt-idea'

repositories {
mavenCentral()
}

dependencies {
}

compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
2 changes: 1 addition & 1 deletion 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-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
15 changes: 9 additions & 6 deletions server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
plugins {
id 'application'
id 'kotlin'
id 'kotlin-kapt'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.palantir.git-version' version '3.0.0'
id('application')
id('org.jetbrains.kotlin.jvm')
id('org.jetbrains.kotlin.kapt')
id('com.github.johnrengelman.shadow') version '7.1.2'
id('com.palantir.git-version') version '3.0.0'
id('com.google.protobuf') version '0.9.4' apply false
}
apply from: '../libpretixsync-repo/libpretixsync/versions.gradle'

Expand All @@ -12,7 +13,6 @@ version gitVersion()

repositories {
mavenCentral()
jcenter()
}

dependencies {
Expand Down Expand Up @@ -55,13 +55,16 @@ dependencies {
mainClassName = "eu.pretix.pretixscan.scanproxy.Server"

jar {
dependsOn(':libpretixsync:jar')

duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes "Main-Class": mainClassName
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
Expand Down

0 comments on commit 6cc93c8

Please sign in to comment.