diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 9d8d589f8..285578201 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -5,17 +5,17 @@ const val KEY_PUBLISH_ARTIFACT_ID = "PUBLISH_ARTIFACT_ID" const val KEY_SDK_NAME = "SDK_NAME" //Latest versions -const val BOM_VERSION = "1.31.4" +const val BOM_VERSION = "1.31.3" const val FOUNDATION_VERSION = "1.17.1" -const val CORE_VERSION = "1.31.3" -const val SIGN_VERSION = "2.31.3" +const val CORE_VERSION = "1.31.2" +const val SIGN_VERSION = "2.31.2" const val AUTH_VERSION = "1.28.2" const val CHAT_VERSION = "1.0.0-beta30" -const val NOTIFY_VERSION = "1.3.3" -const val WEB_3_WALLET_VERSION = "1.31.3" -const val WEB_3_MODAL_VERSION = "1.5.3" -const val WC_MODAL_VERSION = "1.5.3" -const val MODAL_CORE_VERSION = "1.5.3" +const val NOTIFY_VERSION = "1.3.2" +const val WEB_3_WALLET_VERSION = "1.31.2" +const val WEB_3_MODAL_VERSION = "1.5.2" +const val WC_MODAL_VERSION = "1.5.2" +const val MODAL_CORE_VERSION = "1.5.2" val jvmVersion = JavaVersion.VERSION_11 const val MIN_SDK: Int = 23 diff --git a/buildSrc/src/main/kotlin/jacoco-report.gradle.kts b/buildSrc/src/main/kotlin/jacoco-report.gradle.kts index 1867a138c..8daea975b 100644 --- a/buildSrc/src/main/kotlin/jacoco-report.gradle.kts +++ b/buildSrc/src/main/kotlin/jacoco-report.gradle.kts @@ -24,14 +24,14 @@ private val sourceDirectoriesTree = fileTree("${project.projectDir}") { "src/debug/**", ) } -private val classDirectoriesTree = fileTree("${project.buildDir}") { +private val classDirectoriesTree = fileTree("${project.layout.buildDirectory}") { include( "intermediates/javac/debug/classes/**", "tmp/kotlin-classes/debug/**" ) exclude(fileFilter) } -private val executionDataTree = fileTree(project.buildDir) { +private val executionDataTree = fileTree(project.layout.buildDirectory) { include( "jacoco/testDebugUnitTest.exec" ) @@ -46,8 +46,8 @@ tasks { reports { xml.required.set(true) html.required.set(true) - html.outputLocation.set(file("${buildDir}/reports/jacoco/html")) - xml.outputLocation.set(file("${buildDir}/reports/jacoco/xml/jacoco.xml")) + html.outputLocation.set(file("${layout.buildDirectory}/reports/jacoco/html")) + xml.outputLocation.set(file("${layout.buildDirectory}/reports/jacoco/xml/jacoco.xml")) } sourceDirectories.setFrom(sourceDirectoriesTree) classDirectories.setFrom(files(classDirectoriesTree)) diff --git a/buildSrc/src/main/kotlin/publish-module-android.gradle.kts b/buildSrc/src/main/kotlin/publish-module-android.gradle.kts index 33705d180..dbf203058 100644 --- a/buildSrc/src/main/kotlin/publish-module-android.gradle.kts +++ b/buildSrc/src/main/kotlin/publish-module-android.gradle.kts @@ -12,10 +12,9 @@ tasks { register("javadocJar", Jar::class) { dependsOn(named("dokkaHtml")) archiveClassifier.set("javadoc") - from("$buildDir/dokka/html") + from("${layout.buildDirectory}/dokka/html") } - @Suppress("UnstableApiUsage") register("sourcesJar", Jar::class) { archiveClassifier.set("sources") from( @@ -41,6 +40,8 @@ afterEvaluate { artifactId = requireNotNull(project.extra[KEY_PUBLISH_ARTIFACT_ID]).toString() version = requireNotNull(project.extra[KEY_PUBLISH_VERSION]).toString() + println("kobe: android artefact: $artifactId") + pom { name.set("WalletConnect ${requireNotNull(extra.get(KEY_SDK_NAME))}") description.set("${requireNotNull(extra.get(KEY_SDK_NAME))} SDK for WalletConnect") diff --git a/buildSrc/src/main/kotlin/publish-module-java.gradle.kts b/buildSrc/src/main/kotlin/publish-module-java.gradle.kts index 3872dce24..65ce7f161 100644 --- a/buildSrc/src/main/kotlin/publish-module-java.gradle.kts +++ b/buildSrc/src/main/kotlin/publish-module-java.gradle.kts @@ -21,6 +21,7 @@ tasks { afterEvaluate { publishing { publications { + println("kobe: start publishing") register("mavenJvm") { plugins.withId("java") { from(components["java"]) @@ -32,10 +33,13 @@ afterEvaluate { from(components["javaPlatform"]) } + groupId = "com.walletconnect" artifactId = requireNotNull(extra.get(KEY_PUBLISH_ARTIFACT_ID)).toString() version = requireNotNull(extra.get(KEY_PUBLISH_VERSION)).toString() + println("kobe: artefact: $artifactId") + pom { name.set("WalletConnect ${requireNotNull(extra.get(KEY_SDK_NAME))}") description.set("${requireNotNull(extra.get(KEY_SDK_NAME))} SDK for WalletConnect") @@ -77,5 +81,6 @@ signing { System.getenv("SIGNING_KEY"), System.getenv("SIGNING_PASSWORD") ) + println("kobe: signing") sign(publishing.publications) } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/release-scripts.gradle.kts b/buildSrc/src/main/kotlin/release-scripts.gradle.kts index fc435d680..7a9a13403 100644 --- a/buildSrc/src/main/kotlin/release-scripts.gradle.kts +++ b/buildSrc/src/main/kotlin/release-scripts.gradle.kts @@ -1,4 +1,5 @@ import org.apache.tools.ant.taskdefs.condition.Os +import java.util.Locale import kotlin.reflect.full.safeCast // Example ./gradlew releaseAllSDKs -Ptype=local @@ -9,16 +10,18 @@ tasks.register("releaseAllSDKs") { ?.run(String::class::safeCast) ?.run { println("Converting parameter to an supported ReleaseType value") - ReleaseType.valueOf(this.toUpperCase()) + ReleaseType.valueOf(this.uppercase(Locale.getDefault())) }?.let { releaseType -> + println("kobe: Release type: $releaseType") generateListOfModuleTasks(releaseType).forEach { task -> - println("Executing Task: $task") + println("kobe: Executing Task: $task") exec { val gradleCommand = if (Os.isFamily(Os.FAMILY_WINDOWS)) { "gradlew.bat" } else { "./gradlew" } + println("kobe: Gradle Command: $gradleCommand; Task: ${task.path}") commandLine(gradleCommand, task.path) } } @@ -47,6 +50,8 @@ fun compileListOfSDKs(): List> = mutableListOf( // This extension function will determine which task to run based on the type passed fun List>.extractListOfPublishingTasks(type: ReleaseType): List = map { (parentModule, childModule, env) -> +// println("kobe: Parent Module: $parentModule, Child Module: $childModule, Env: $env") + val task = when { env == "jvm" && type == ReleaseType.LOCAL -> "${publishJvmRoot}MavenLocal" env == "jvm" && type == ReleaseType.SONATYPE -> "${publishJvmRoot}SonatypeRepository" @@ -56,6 +61,7 @@ fun List>.extractListOfPublishingTasks(type: Rel } val module = if (childModule != null) { +// println("kobe: subprojects $subprojects") subprojects.first { it.name == parentModule }.subprojects.first { it.name == childModule } } else { subprojects.first { it.name == parentModule } diff --git a/core/modal/build.gradle.kts b/core/modal/build.gradle.kts index c5dff9bae..a875f9f91 100644 --- a/core/modal/build.gradle.kts +++ b/core/modal/build.gradle.kts @@ -38,7 +38,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } buildFeatures { compose = true diff --git a/gradle.properties b/gradle.properties index 275c33e47..6d0d81c77 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,5 @@ android.useAndroidX=true android.enableJetifier=false # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official -android.enableR8.fullMode=false \ No newline at end of file +android.enableR8.fullMode=false +org.gradle.warning.mode=all \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ef5d84cbc..a7a8b7a39 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,14 +1,14 @@ [versions] jerseyCommon = "3.1.0" -kotlin = "1.9.23" -ksp = "1.9.23-1.0.19" -agp = "8.3.1" +kotlin = "1.9.24" +ksp = "1.9.24-1.0.20" +agp = "8.4.0" minSdk = "23" targetSdk = "34" compileSdk = "34" -composeCompiler = "1.5.11" +composeCompiler = "1.5.14" composeBOM = "2024.03.00" composeViewModel = "2.6.1" accompanist = "0.31.3-beta" diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f6b961fd5..7f93135c4 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5416938db..8b0ecd8c9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jun 21 12:19:25 CEST 2023 +#Mon May 20 12:20:30 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/product/walletconnectmodal/build.gradle.kts b/product/walletconnectmodal/build.gradle.kts index 49db4c8d6..fe33dd93f 100644 --- a/product/walletconnectmodal/build.gradle.kts +++ b/product/walletconnectmodal/build.gradle.kts @@ -44,7 +44,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } buildFeatures { compose = true diff --git a/product/web3modal/build.gradle.kts b/product/web3modal/build.gradle.kts index ae7c59b46..e3a4d655c 100644 --- a/product/web3modal/build.gradle.kts +++ b/product/web3modal/build.gradle.kts @@ -44,7 +44,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } buildFeatures { compose = true diff --git a/product/web3wallet/build.gradle.kts b/product/web3wallet/build.gradle.kts index e49040978..9fdeeeb44 100644 --- a/product/web3wallet/build.gradle.kts +++ b/product/web3wallet/build.gradle.kts @@ -39,7 +39,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } buildFeatures { diff --git a/protocol/chat/build.gradle.kts b/protocol/chat/build.gradle.kts index 5b1250ef7..5e7639560 100644 --- a/protocol/chat/build.gradle.kts +++ b/protocol/chat/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.android.library") + id(libs.plugins.android.library.get().pluginId) id(libs.plugins.kotlin.android.get().pluginId) alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) @@ -60,14 +60,14 @@ dependencies { debugImplementation(project(":core:android")) releaseImplementation("com.walletconnect:android-core:$CORE_VERSION") - retrofit() + implementation(libs.bundles.retrofit) ksp(libs.moshi.ksp) implementation(libs.bundles.sqlDelight) - androidXTest() + testImplementation(libs.bundles.androidxTest) testImplementation(libs.robolectric) testImplementation(libs.json) testImplementation(libs.coroutines.test) - scarletTest() + testImplementation(libs.bundles.scarlet.test) testImplementation(libs.bundles.sqlDelight.test) } \ No newline at end of file diff --git a/protocol/notify/build.gradle.kts b/protocol/notify/build.gradle.kts index e4d7be465..10c7b0560 100644 --- a/protocol/notify/build.gradle.kts +++ b/protocol/notify/build.gradle.kts @@ -46,7 +46,7 @@ android { } kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } testOptions { diff --git a/protocol/sign/build.gradle.kts b/protocol/sign/build.gradle.kts index 74c2bec6c..f029b17a8 100644 --- a/protocol/sign/build.gradle.kts +++ b/protocol/sign/build.gradle.kts @@ -61,7 +61,7 @@ android { kotlinOptions { jvmTarget = jvmVersion.toString() - freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime" + freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime" } testOptions { diff --git a/settings.gradle.kts b/settings.gradle.kts index 23948ced0..3358c9dc1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -11,8 +11,7 @@ val excludedDirs = listOf( "gradle", "docs", "licenses", - "walletconnectv2", - "chat" + "walletconnectv2" ) // TODO: Add to rootModules when new module is added to the project root directory val rootModules = listOf("foundation")