From 2877b5532c33768749d4c0d3519734038e1c2ebf Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 27 Apr 2023 16:24:58 +0600 Subject: [PATCH] Revert "Get back some functional of "trying to update up to gradle wrapper 8.1.1"" This reverts commit b938b2139549c8124101957f48e6bad2ef9db477. --- crypto/build.gradle | 8 ++++++ defaultAndroidSettings.gradle | 1 - dokka/build.gradle | 24 ++++++++++++++++ gradle.properties | 1 - gradle/libs.versions.toml | 7 +++-- gradle/wrapper/gradle-wrapper.properties | 2 +- jvm.publish.gradle | 36 +++++++++++------------- koin/generator/build.gradle | 9 ------ language_codes/generator/build.gradle | 4 --- publish.gradle | 3 +- repos/generator/build.gradle | 9 ------ settings.gradle | 2 ++ 12 files changed, 57 insertions(+), 49 deletions(-) diff --git a/crypto/build.gradle b/crypto/build.gradle index 18da1fa2ddf..686093b86f0 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -21,3 +21,11 @@ kotlin { } } } + +android { + sourceSets { + main { + java.srcDirs += [ "src/jvmMain/kotlin" ] + } + } +} diff --git a/defaultAndroidSettings.gradle b/defaultAndroidSettings.gradle index 5d62eac2348..267a33409e6 100644 --- a/defaultAndroidSettings.gradle +++ b/defaultAndroidSettings.gradle @@ -1,7 +1,6 @@ apply plugin: 'com.getkeepsafe.dexcount' android { - namespace "${group}.${project.name}" compileSdkVersion libs.versions.android.props.compileSdk.get().toInteger() buildToolsVersion libs.versions.android.props.buildTools.get() diff --git a/dokka/build.gradle b/dokka/build.gradle index 06c51c8fd01..045902ca9fa 100644 --- a/dokka/build.gradle +++ b/dokka/build.gradle @@ -13,6 +13,10 @@ repositories { kotlin { jvm() +// js(IR) { +// browser() +// nodejs() +// } android {} sourceSets { @@ -34,6 +38,22 @@ kotlin { } } } +// jsMain { +// dependencies { +// implementation kotlin('stdlib') + +// project.parent.subprojects.forEach { +// if ( +// it != project +// && it.hasProperty("kotlin") +// && it.kotlin.sourceSets.any { it.name.contains("commonMain") } +// && it.kotlin.sourceSets.any { it.name.contains("jsMain") } +// ) { +// api it +// } +// } +// } +// } jvmMain { dependencies { implementation kotlin('stdlib') @@ -96,6 +116,10 @@ tasks.dokkaHtml { sourceRoots.setFrom(findSourcesWithName("commonMain")) } +// named("jsMain") { +// sourceRoots.setFrom(findSourcesWithName("jsMain", "commonMain")) +// } + named("jvmMain") { sourceRoots.setFrom(findSourcesWithName("jvmMain")) } diff --git a/gradle.properties b/gradle.properties index 4820c726d7b..5db53e2a94f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,6 @@ org.gradle.parallel=true kotlin.js.generate.externals=true kotlin.incremental=true kotlin.incremental.js=true -#kotlin.mpp.androidSourceSetLayoutVersion=2 android.useAndroidX=true android.enableJetifier=true org.gradle.jvmargs=-Xmx2g diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 57c71a42f2d..250c3e379c5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,9 +42,6 @@ android-props-buildTools = "33.0.2" kt-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kt" } kt-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kt" } -kt-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kt" } -kt-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kt" } -kt-test-annotations-common = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kt" } kt-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kt-serialization" } kt-serialization-cbor = { module = "org.jetbrains.kotlinx:kotlinx-serialization-cbor", version.ref = "kt-serialization" } @@ -88,6 +85,10 @@ android-fragment = { module = "androidx.fragment:fragment", version.ref = "andro android-espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "android-espresso" } android-test-junit = { module = "androidx.test.ext:junit", version.ref = "android-test" } + +kt-test-js = { module = "org.jetbrains.kotlin:kotlin-test-js", version.ref = "kt" } +kt-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kt" } + # ksp dependencies kotlin-poet = { module = "com.squareup:kotlinpoet-ksp", version.ref = "kotlin-poet" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049a6f..774fae87671 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/jvm.publish.gradle b/jvm.publish.gradle index 86427b68ae6..074de9bf513 100644 --- a/jvm.publish.gradle +++ b/jvm.publish.gradle @@ -2,13 +2,11 @@ apply plugin: 'maven-publish' task javadocJar(type: Jar) { from javadoc - archiveClassifier.convention("javadoc") - archiveClassifier.set("javadoc") + classifier = 'javadoc' } task sourcesJar(type: Jar) { from sourceSets.main.allSource - archiveClassifier.convention("sources") - archiveClassifier.set("sources") + classifier = 'sources' } publishing { @@ -32,29 +30,29 @@ publishing { } developers { - + developer { id = "InsanusMokrassar" name = "Aleksei Ovsiannikov" email = "ovsyannikov.alexey95@gmail.com" } - + developer { id = "000Sanya" name = "Syrov Aleksandr" email = "000sanya.000sanya@gmail.com" } - + } licenses { - + license { name = "Apache Software License 2.0" url = "https://github.com/InsanusMokrassar/MicroUtils/blob/master/LICENSE" } - + } } repositories { @@ -62,40 +60,40 @@ publishing { maven { name = "GithubPackages" url = uri("https://maven.pkg.github.com/InsanusMokrassar/MicroUtils") - + 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') } - + } } } @@ -105,13 +103,13 @@ publishing { if (project.hasProperty("signing.gnupg.keyName")) { apply plugin: 'signing' - + signing { useGpgCmd() - + sign publishing.publications } - + task signAll { tasks.withType(Sign).forEach { dependsOn(it) diff --git a/koin/generator/build.gradle b/koin/generator/build.gradle index 372fe9025bd..dc08c5eb3a6 100644 --- a/koin/generator/build.gradle +++ b/koin/generator/build.gradle @@ -13,12 +13,3 @@ dependencies { api libs.kotlin.poet api libs.ksp } - -kotlin { - jvmToolchain(8) -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} diff --git a/language_codes/generator/build.gradle b/language_codes/generator/build.gradle index f8fff532752..4b3027381f8 100644 --- a/language_codes/generator/build.gradle +++ b/language_codes/generator/build.gradle @@ -25,10 +25,6 @@ dependencies { mainClassName="MainKt" -kotlin { - jvmToolchain(8) -} - java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/publish.gradle b/publish.gradle index d7c9a873f1e..d3300addb04 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") + classifier = 'javadoc' } publishing { diff --git a/repos/generator/build.gradle b/repos/generator/build.gradle index 32c89100548..112b1af1eac 100644 --- a/repos/generator/build.gradle +++ b/repos/generator/build.gradle @@ -14,12 +14,3 @@ dependencies { api libs.kotlin.poet api libs.ksp } - -kotlin { - jvmToolchain(8) -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} diff --git a/settings.gradle b/settings.gradle index e542629aa15..ec21091c550 100644 --- a/settings.gradle +++ b/settings.gradle @@ -57,3 +57,5 @@ includes.each { originalName -> project.name = projectName project.projectDir = new File(projectDirectory) } + +enableFeaturePreview("VERSION_CATALOGS")