Fix gradle deprecations

This commit is contained in:
Niko Diamadis
2024-03-06 22:41:29 +01:00
parent 433f7ec341
commit 22feec66b0
5 changed files with 21 additions and 39 deletions

View File

@@ -1,38 +1,16 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.3'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id 'com.android.application' version '8.1.3' apply false
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
id 'org.hidetake.swagger.generator' version '2.14.0'
}
ext {
gotifyVersion = 'master'
specLocation = "$buildDir/gotify.spec.json"
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io/" }
}
specLocation = "$layout.buildDirectory/gotify.spec.json"
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
delete rootProject.layout.buildDirectory
}
static def download(String url, String filename ) {
@@ -49,7 +27,7 @@ static def download(String url, String filename ) {
tasks.register('downloadSpec') {
inputs.property 'version', gotifyVersion
doFirst {
buildDir.mkdirs()
layout.buildDirectory.mkdirs()
download("https://raw.githubusercontent.com/gotify/server/${gotifyVersion}/docs/spec.json", specLocation)
}
}