Skip to content
This repository was archived by the owner on Sep 8, 2026. It is now read-only.

Commit 2a12562

Browse files
committed
Create the pera wallet connect v1 - v2 project
1 parent 657684c commit 2a12562

488 files changed

Lines changed: 25801 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish all modules to Maven Central (NMCP)
2+
3+
on:
4+
push:
5+
tags: [ 'v*.*.*' ]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout source
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: temurin
19+
java-version: 21
20+
cache: gradle
21+
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v3
24+
25+
- name: Publish to Maven Central (NMCP)
26+
run: ./gradlew --no-daemon clean publishAggregationToCentralPortal --stacktrace
27+
env:
28+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
29+
GPG_PRIVATE_KEY_PASSWORD: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}
30+
CENTRAL_PORTAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
31+
CENTRAL_PORTAL_TOKEN: ${{ secrets.CENTRAL_PORTAL_TOKEN }}

.gitignore

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# --- Android build artifacts ---
2+
*.apk
3+
*.aar
4+
*.ap_
5+
*.aab
6+
*.dex
7+
*.class
8+
9+
# --- Build directories ---
10+
bin/
11+
gen/
12+
out/
13+
.gradle/
14+
build/
15+
16+
# --- Local configuration ---
17+
local.properties
18+
19+
# --- ProGuard / R8 ---
20+
proguard/
21+
22+
# --- Logs ---
23+
*.log
24+
25+
# --- Android Studio / IntelliJ ---
26+
*.iml
27+
/.idea/
28+
.idea/workspace.xml
29+
.idea/tasks.xml
30+
.idea/gradle.xml
31+
.idea/assetWizardSettings.xml
32+
.idea/dictionaries
33+
.idea/libraries
34+
.idea/jarRepositories.xml
35+
.idea/caches
36+
.idea/modules.xml
37+
.idea/navEditor.xml
38+
!.idea/codeStyles/**
39+
!.idea/editor.xml
40+
!/.idea/inspectionProfiles
41+
42+
# --- NDK & Native builds ---
43+
.externalNativeBuild/
44+
.cxx/
45+
46+
# --- Google Services ---
47+
**/google-services.json
48+
49+
# --- Freeline (old build system) ---
50+
freeline.py
51+
freeline/
52+
freeline_project_description.json
53+
54+
# --- Fastlane (release automation) ---
55+
fastlane/report.xml
56+
fastlane/Preview.html
57+
fastlane/screenshots/
58+
fastlane/test_output/
59+
fastlane/readme.md
60+
61+
# --- Version control metadata ---
62+
vcs.xml
63+
64+
# --- Lint ---
65+
lint/intermediates/
66+
lint/generated/
67+
lint/outputs/
68+
lint/tmp/
69+
70+
# --- Android Profiling ---
71+
*.hprof
72+
73+
# --- Keystore files ---
74+
*.keystore
75+
# *.jks # uncomment if needed
76+
77+
# --- Module build directories ---
78+
core/build/

build.gradle.kts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import org.gradle.api.publish.PublishingExtension
2+
import org.gradle.plugins.signing.SigningExtension
3+
4+
plugins {
5+
alias(libs.plugins.kotlin.android) apply false
6+
alias(libs.plugins.android.library) apply false
7+
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
8+
alias(libs.plugins.versions.plugin)
9+
alias(libs.plugins.mavenPublish)
10+
}
11+
12+
tasks.register<Delete>("clean") {
13+
delete(rootProject.layout.buildDirectory)
14+
}
15+
16+
nmcpAggregation {
17+
centralPortal {
18+
username = System.getenv("CENTRAL_PORTAL_USERNAME")
19+
password = System.getenv("CENTRAL_PORTAL_TOKEN")
20+
publishingType = "AUTOMATIC"
21+
}
22+
23+
publishAllProjectsProbablyBreakingProjectIsolation()
24+
}
25+
26+
subprojects {
27+
plugins.withId("maven-publish") {
28+
project.pluginManager.apply("signing")
29+
30+
project.extensions.configure<SigningExtension> {
31+
val publishing = project.extensions.findByType(PublishingExtension::class.java)
32+
val key = System.getenv("GPG_PRIVATE_KEY")
33+
val password = System.getenv("GPG_PRIVATE_KEY_PASSWORD")
34+
35+
if (!key.isNullOrBlank() && !password.isNullOrBlank()) {
36+
useInMemoryPgpKeys(key, password)
37+
sign(publishing?.publications)
38+
}
39+
}
40+
}
41+
}

gradle.properties

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. For more details, visit
12+
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
13+
# org.gradle.parallel=true
14+
# AndroidX package structure to make it clearer which packages are bundled with the
15+
# Android operating system, and which are packaged with your app's APK
16+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17+
android.useAndroidX=true
18+
# Kotlin code style for this project: "official" or "obsolete":
19+
kotlin.code.style=official
20+
# Enables namespacing of each library's R class so that its R class includes only the
21+
# resources declared in the library itself and none from the library's dependencies,
22+
# thereby reducing the size of the R class for that library
23+
android.nonTransitiveRClass=true
24+
android.enableJetifier=true
25+
org.gradle.vfs.watch=true
26+
org.gradle.parallel=true
27+
org.gradle.caching=true
28+
kotlin.apple.xcodeCompatibility.nowarn=true
29+
kotlin.apple.deprecated.allowUsingEmbedAndSignWithCocoaPodsDependencies=true
30+
ksp.incremental=false
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
-keep class com.squareup.moshi.** { *; }
2+
3+
# JSR 305 annotations are for embedding nullability information.
4+
-dontwarn javax.annotation.**
5+
-adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
6+
-dontwarn org.codehaus.mojo.animal_sniffer.*
7+
8+
-keepclasseswithmembers class * {
9+
@com.squareup.moshi.* <methods>;
10+
}
11+
12+
-keep @com.squareup.moshi.JsonQualifier @interface *
13+
14+
# Enum field names are used by the integrated EnumJsonAdapter.
15+
# values() is synthesized by the Kotlin compiler and is used by EnumJsonAdapter indirectly
16+
# Annotate enums with @JsonClass(generateAdapter = false) to use them with Moshi.
17+
#noinspection ShrinkerUnresolvedReference
18+
-keepclassmembers @com.squareup.moshi.JsonClass class * extends java.lang.Enum {
19+
<fields>;
20+
**[] values();
21+
}
22+
23+
# Keep helper method to avoid R8 optimisation that would keep all Kotlin Metadata when unwanted
24+
#noinspection ShrinkerUnresolvedReference
25+
-keepclassmembers class com.squareup.moshi.internal.Util {
26+
private static java.lang.String getKotlinMetadataClassName();
27+
}
28+
29+
# Keep ToJson/FromJson-annotated methods
30+
-keepclassmembers class * {
31+
#noinspection ShrinkerUnresolvedReference
32+
@com.squareup.moshi.FromJson <methods>;
33+
#noinspection ShrinkerUnresolvedReference
34+
@com.squareup.moshi.ToJson <methods>;
35+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-if interface * { @com.tinder.scarlet.ws.* <methods>; }
2+
-keep,allowobfuscation interface <1>
3+
4+
-keepclassmembers,allowshrinking,allowobfuscation interface * {
5+
@com.tinder.scarlet.ws.* <methods>;
6+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-keep,includedescriptorclasses class net.sqlcipher.** { *; }
2+
-keep,includedescriptorclasses interface net.sqlcipher.** { *; }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-keep class com.walletconnect.android.** { *; }
2+
-keep interface com.walletconnect.** { *; }
3+
-keep class kotlinx.coroutines.** { *; }
4+
5+
-dontwarn kotlinx.coroutines.**
6+
-dontwarn org.conscrypt.**
7+
-dontwarn org.bouncycastle.**
8+
-dontwarn org.openjsse.**
9+
-dontwarn okhttp3.internal.platform.**
10+
11+
-allowaccessmodification
12+
-keeppackagenames doNotKeepAThing
13+
14+
-dontwarn groovy.lang.GroovyShell

gradle/libs.versions.toml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
[versions]
2+
peraWalletConnect = "1.0.8"
3+
minSdk = "24"
4+
compileSdk = "36"
5+
targetSdk = "36"
6+
7+
agp = "8.13.0"
8+
kotlin = "2.1.0"
9+
10+
# Libraries
11+
moshi = "1.15.2"
12+
okhttp = "5.2.1"
13+
gson = "2.13.2"
14+
khex = "1.1.2"
15+
bcprov = "1.82"
16+
17+
ksp = "2.1.0-1.0.29"
18+
19+
coroutines = "1.10.2"
20+
sqlDelight = "2.1.0"
21+
scarlet = "1.0.1"
22+
koin = "4.1.1"
23+
retrofit = "3.0.0"
24+
sqlCipher = "4.11.0"
25+
multibase = "1.1.1"
26+
timber = "5.0.1"
27+
web3j = "5.0.1"
28+
kethereum = "0.86.0"
29+
relinker = "1.4.5"
30+
31+
firebaseBOM = "34.4.0"
32+
33+
androidxSecurity = "1.1.0"
34+
nmcp = "1.2.0"
35+
36+
[libraries]
37+
38+
# Core
39+
moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
40+
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
41+
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
42+
bcprov = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bcprov" }
43+
khex-core = { module = "com.github.komputing.khex:core", version.ref = "khex" }
44+
khex-extensions = { module = "com.github.komputing.khex:extensions", version.ref = "khex" }
45+
46+
sqlDelight-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqlDelight" }
47+
sqlDelight-coroutines = { module = "app.cash.sqldelight:coroutines-extensions", version.ref = "sqlDelight" }
48+
sqlDelight-adapters = { module = "app.cash.sqldelight:primitive-adapters", version.ref = "sqlDelight" }
49+
sqlDelight-async = { module = "app.cash.sqldelight:async-extensions", version.ref = "sqlDelight" }
50+
51+
androidx-security = { module = "androidx.security:security-crypto-ktx", version.ref = "androidxSecurity" }
52+
53+
#-------------------------- Compose --------------------------
54+
coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
55+
56+
scarlet = { module = "com.walletconnect.Scarlet:scarlet", version.ref = "scarlet" }
57+
scarlet-okhttp = { module = "com.walletconnect.Scarlet:websocket-okhttp", version.ref = "scarlet" }
58+
scarlet-coroutines = { module = "com.walletconnect.Scarlet:stream-adapter-coroutines", version.ref = "scarlet" }
59+
scarlet-moshi = { module = "com.walletconnect.Scarlet:message-adapter-moshi", version.ref = "scarlet" }
60+
scarlet-android = { module = "com.walletconnect.Scarlet:lifecycle-android", version.ref = "scarlet" }
61+
62+
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
63+
retrofit-moshi = { module = "com.squareup.retrofit2:converter-moshi", version.ref = "retrofit" }
64+
65+
moshi-adapters = { module = "com.squareup.moshi:moshi-adapters", version.ref = "moshi" }
66+
moshi-ksp = { module = "com.squareup.moshi:moshi-kotlin-codegen", version.ref = "moshi" }
67+
68+
okhttp-logging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
69+
70+
koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }
71+
72+
kethereum-bip39 = { module = "com.github.komputing.kethereum:bip39", version.ref = "kethereum" }
73+
kethereum-bip39-wordlist = { module = "com.github.komputing.kethereum:bip39_wordlist_en", version.ref = "kethereum" }
74+
kethereum-bip32 = { module = "com.github.komputing.kethereum:bip32", version.ref = "kethereum" }
75+
kethereum-model = { module = "com.github.komputing.kethereum:model", version.ref = "kethereum" }
76+
kethereum-crypto = { module = "com.github.komputing.kethereum:crypto_impl_spongycastle", version.ref = "kethereum" }
77+
78+
# Firebase — versions via BOM
79+
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBOM" }
80+
firebase-messaging = { module = "com.google.firebase:firebase-messaging" }
81+
82+
sqlCipher = { module = "net.zetetic:sqlcipher-android", version.ref = "sqlCipher" }
83+
relinker = { module = "com.getkeepsafe.relinker:relinker", version.ref = "relinker" }
84+
mulitbase = { module = "com.github.multiformats:java-multibase", version.ref = "multibase" }
85+
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }
86+
web3jCrypto = { module = "org.web3j:crypto", version.ref = "web3j" }
87+
88+
[bundles]
89+
sqlDelight = ["sqlDelight-android", "sqlDelight-coroutines", "sqlDelight-adapters", "sqlDelight-async"]
90+
91+
scarlet = ["scarlet", "scarlet-okhttp", "scarlet-coroutines", "scarlet-moshi"]
92+
93+
retrofit = ["retrofit", "retrofit-moshi"]
94+
kethereum = ["kethereum-bip39", "kethereum-bip39-wordlist", "kethereum-bip32", "kethereum-model", "kethereum-crypto"]
95+
96+
[plugins]
97+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
98+
android-library = { id = "com.android.library", version.ref = "agp" }
99+
jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
100+
versions-plugin = { id = "com.github.ben-manes.versions", version = "0.53.0" }
101+
102+
google-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
103+
sqlDelight = { id = "app.cash.sqldelight", version.ref = "sqlDelight" }
104+
mavenPublish = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" }
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-allowaccessmodification
2+
-keeppackagenames doNotKeepAThing
3+
4+
-dontobfuscate
5+
-dontshrink
6+
-dontoptimize
7+
-dontusemixedcaseclassnames
8+
-dontwarn java.lang.invoke.StringConcatFactory

0 commit comments

Comments
 (0)