mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
Switch the Java toolchain to version 21 - the version shipped with current AndroidStudio releases. Disable Java 1.8 warnings - see discussion in PR #4735
50 lines
1.1 KiB
Groovy
50 lines
1.1 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'maven-publish'
|
|
id 'application'
|
|
}
|
|
|
|
base.archivesName = 'gadgetbridge-daogenerator'
|
|
|
|
dependencies {
|
|
// https://github.com/Freeyourgadget/greenDAO/tree/fyg
|
|
implementation 'com.github.Freeyourgadget:greendao:1998d7cd2d21f662c6044f6ccf3b3a251bbad341'
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir 'src'
|
|
}
|
|
}
|
|
}
|
|
|
|
application.mainClass = "nodomain.freeyourgadget.gadgetbridge.daogen.GBDaoGenerator"
|
|
|
|
tasks.register('genSources', JavaExec) {
|
|
inputs.dir(file("src"))
|
|
outputs.dir(project.rootProject.file("app/src/main/java"))
|
|
|
|
mainClass = application.mainClass
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
workingDir = '../'
|
|
}
|
|
|
|
artifacts {
|
|
archives jar
|
|
}
|
|
|
|
java {
|
|
// setting sourceCompatibility and targetCompatibility isn't required because this module
|
|
// ships no complied code
|
|
toolchain.languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
|
|
tasks.named("distTar") {
|
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
|
}
|
|
|
|
tasks.named("distZip") {
|
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
|
}
|