Skip to content

Commit

Permalink
- Fix building examples
Browse files Browse the repository at this point in the history
- Update Gradle to it's most recent version and get rid of some deprecated methods.
- Updating the Kotlin plugin to it's most recent stable version.
  • Loading branch information
cdr-chakotay committed Mar 18, 2024
1 parent 1c31d20 commit 4956418
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
implementation 'io.tus.java.client:tus-java-client:0.4.5'
implementation 'joda-time:joda-time:2.12.2'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'org.json:json:20230227'
implementation 'org.json:json:20231013'
implementation 'commons-codec:commons-codec:1.15'
implementation 'io.socket:socket.io-client:2.1.0'

Expand All @@ -35,12 +35,14 @@ dependencies {
testImplementation 'org.mockito:mockito-core:4.8.0'
}

task sourcesJar(type: Jar, dependsOn: classes) {
tasks.register('sourcesJar', Jar) {
dependsOn classes
archiveClassifier.set('sources')
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
tasks.register('javadocJar', Jar) {
dependsOn javadoc
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
Expand Down
19 changes: 12 additions & 7 deletions examples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group 'com.transloadit.example'
version '0.0.1'

apply plugin: 'java'
apply plugin: 'kotlin'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
jcenter()
}

dependencies {
implementation rootProject
implementation 'org.json:json:20210307'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'org.json:json:20231013'
}
buildscript {
ext.kotlin_version = '1.5.20-RC'
ext.kotlin_version = '1.9.23'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}
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-8.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 4956418

Please sign in to comment.