Skip to content

Commit

Permalink
Fix gradle deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Mar 6, 2024
1 parent 433f7ec commit 22feec6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 39 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ android {
}
buildFeatures {
viewBinding true
buildConfig true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
Expand Down
32 changes: 5 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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 ) {
Expand All @@ -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)
}
}
Expand Down
11 changes: 0 additions & 11 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@ apply plugin: 'eclipse'
group = 'io.swagger'
version = '1.0.0'

buildscript {
repositories {
google()
}
}

repositories {
jcenter()
}


apply plugin: 'java-library'

sourceCompatibility = JavaVersion.VERSION_1_7
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.nonFinalResIds=true
android.nonTransitiveRClass=true
Expand Down
15 changes: 15 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io/" }
}
}
rootProject.name = "Gotify Android"
include ':app'
include ':client'

0 comments on commit 22feec6

Please sign in to comment.