Skip to content

Commit

Permalink
Fixing release wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubuid committed May 21, 2024
1 parent d8a4397 commit d2b745b
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 35 deletions.
16 changes: 8 additions & 8 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/src/main/kotlin/jacoco-report.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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))
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/publish-module-android.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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")
Expand Down
5 changes: 5 additions & 0 deletions buildSrc/src/main/kotlin/publish-module-java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ tasks {
afterEvaluate {
publishing {
publications {
println("kobe: start publishing")
register<MavenPublication>("mavenJvm") {
plugins.withId("java") {
from(components["java"])
Expand All @@ -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")
Expand Down Expand Up @@ -77,5 +81,6 @@ signing {
System.getenv("SIGNING_KEY"),
System.getenv("SIGNING_PASSWORD")
)
println("kobe: signing")
sign(publishing.publications)
}
10 changes: 8 additions & 2 deletions buildSrc/src/main/kotlin/release-scripts.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
}
}
Expand Down Expand Up @@ -47,6 +50,8 @@ fun compileListOfSDKs(): List<Triple<String, String?, String>> = mutableListOf(

// This extension function will determine which task to run based on the type passed
fun List<Triple<String, String?, String>>.extractListOfPublishingTasks(type: ReleaseType): List<Task> = 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"
Expand All @@ -56,6 +61,7 @@ fun List<Triple<String, String?, String>>.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 }
Expand Down
2 changes: 1 addition & 1 deletion core/modal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
android.enableR8.fullMode=false
org.gradle.warning.mode=all
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion product/walletconnectmodal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion product/web3modal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion product/web3wallet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ android {
}
kotlinOptions {
jvmTarget = jvmVersion.toString()
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime"
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime"
}

buildFeatures {
Expand Down
8 changes: 4 additions & 4 deletions protocol/chat/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion protocol/notify/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ android {
}
kotlinOptions {
jvmTarget = jvmVersion.toString()
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime"
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime"
}

testOptions {
Expand Down
2 changes: 1 addition & 1 deletion protocol/sign/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ android {

kotlinOptions {
jvmTarget = jvmVersion.toString()
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.time.ExperimentalTime"
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.time.ExperimentalTime"
}

testOptions {
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d2b745b

Please sign in to comment.