From 34b903082da89352f0ba864a1b82d978d8375b39 Mon Sep 17 00:00:00 2001 From: Armin Date: Tue, 27 Feb 2024 11:53:45 +0100 Subject: [PATCH] Upgrade Gradle and Plugin to 8 and fix warnings --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- src/main/groovy/de.cyface.android-publish.gradle | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index cb8ecf8..f12b15b 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ * along with the Cyface Publish Plugin for Android. If not, see . */ buildscript { - ext.gradle_version = '7.4.2' // Major release available but breaks publish [RFR-412] + ext.gradle_version = '8.2.2' repositories { google() diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e8be595..7fc84be 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/groovy/de.cyface.android-publish.gradle b/src/main/groovy/de.cyface.android-publish.gradle index 472526f..d7c9252 100644 --- a/src/main/groovy/de.cyface.android-publish.gradle +++ b/src/main/groovy/de.cyface.android-publish.gradle @@ -1,5 +1,5 @@ /* - * Copyright 2021 Cyface GmbH + * Copyright 2021-2024 Cyface GmbH * * This file is part of the Cyface Publish Plugin for Android. * @@ -42,9 +42,9 @@ plugins { // Setup Javadoc and source tasks for all build variants. project.android.libraryVariants.all { variant -> - def javaDocDestDir = file("${buildDir}/docs/${variant.name}Javadoc") + def javaDocDestDir = layout.buildDirectory.dir("docs/${variant.name}Javadoc") def javadocTaskName = "${variant.name}Javadoc" - def javadoc = tasks.create(javadocTaskName, Javadoc) { + def javadoc = tasks.register(javadocTaskName, Javadoc) { description "Generates Javadoc for ${variant.name}." source = variant.javaCompileProvider.get().source destinationDir = javaDocDestDir