From 9ecb50e37796ff4cd5fe22f74b09d23ea3817efb Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 4 Nov 2023 21:13:14 +0600 Subject: [PATCH] update dependencies and gradle wrapper --- gradle/libs.versions.toml | 4 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- mppProjectWithSerialization.gradle | 6 ++-- publish.gradle | 39 +++++++++++++----------- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a2005d4492..ced16411b3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,10 +10,10 @@ korlibs = "4.0.10" uuid = "0.8.1" ktor = "2.3.5" -ksp = "1.9.20-1.0.13" +ksp = "1.9.20-1.0.14" kotlin-poet = "1.14.2" -microutils = "0.20.11" +microutils = "0.20.12" github-release-plugin = "2.4.1" dokka = "1.9.10" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7182a7312b..4d6272d996 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip diff --git a/mppProjectWithSerialization.gradle b/mppProjectWithSerialization.gradle index 2f44259eef..aca28aecce 100644 --- a/mppProjectWithSerialization.gradle +++ b/mppProjectWithSerialization.gradle @@ -5,7 +5,7 @@ kotlin { jvm { compilations.main { kotlinOptions { - jvmTarget = "1.8" + jvmTarget = "17" } } } @@ -53,6 +53,6 @@ kotlin { } java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } diff --git a/publish.gradle b/publish.gradle index 0049dfc61a..1a3d5147a0 100644 --- a/publish.gradle +++ b/publish.gradle @@ -1,8 +1,7 @@ apply plugin: 'maven-publish' task javadocsJar(type: Jar) { - archiveClassifier.convention("javadoc") - archiveClassifier.set("javadoc") + archiveClassifier = 'javadoc' } publishing { @@ -20,22 +19,22 @@ publishing { } developers { - + developer { id = "InsanusMokrassar" name = "Ovsiannikov Aleksei" email = "ovsyannikov.alexey95@gmail.com" } - + } licenses { - + license { name = "Apache Software License 2.0" url = "https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE" } - + } } repositories { @@ -43,58 +42,64 @@ publishing { maven { name = "GithubPackages" url = uri("https://maven.pkg.github.com/InsanusMokrassar/TelegramBotAPI") - + credentials { username = project.hasProperty('GITHUBPACKAGES_USER') ? project.property('GITHUBPACKAGES_USER') : System.getenv('GITHUBPACKAGES_USER') password = project.hasProperty('GITHUBPACKAGES_PASSWORD') ? project.property('GITHUBPACKAGES_PASSWORD') : System.getenv('GITHUBPACKAGES_PASSWORD') } - + } } if (project.hasProperty('GITEA_TOKEN') || System.getenv('GITEA_TOKEN') != null) { maven { name = "Gitea" url = uri("https://git.inmo.dev/api/packages/InsanusMokrassar/maven") - + credentials(HttpHeaderCredentials) { name = "Authorization" value = project.hasProperty('GITEA_TOKEN') ? project.property('GITEA_TOKEN') : System.getenv('GITEA_TOKEN') } - + authentication { header(HttpHeaderAuthentication) } - + } } if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) { maven { name = "sonatype" url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") - + credentials { username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER') password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD') } - + } } } } } - + if (project.hasProperty("signing.gnupg.keyName")) { apply plugin: 'signing' - + signing { useGpgCmd() - + sign publishing.publications } - + task signAll { tasks.withType(Sign).forEach { dependsOn(it) } } + + // Workaround to make android sign operations depend on signing tasks + project.getTasks().withType(AbstractPublishToMaven.class).configureEach { + def signingTasks = project.getTasks().withType(Sign.class) + mustRunAfter(signingTasks) + } }