Skip to content

Commit bf98506

Browse files
authored
Merge pull request #114 from Web3Auth/feat/auth-service_v10_changes
feat: auth-service v10 and wallet-service changes
2 parents 848a65c + ca14a1a commit bf98506

35 files changed

+1289
-354
lines changed

app/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ android {
3131

3232
buildTypes {
3333
release {
34-
minifyEnabled true
34+
minifyEnabled false
3535
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
3636
signingConfig signingConfigs.debug
3737
}
@@ -62,6 +62,11 @@ dependencies {
6262

6363
// Web3Auth
6464
implementation project(":core")
65+
api 'io.jsonwebtoken:jjwt-api:0.11.5'
66+
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
67+
runtimeOnly('io.jsonwebtoken:jjwt-orgjson:0.11.5') {
68+
exclude group: 'org.json', module: 'json' //provided by Android natively
69+
}
6570

6671
// Test
6772
testImplementation 'junit:junit:4.13.2'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.web3auth.app
2+
3+
import com.web3auth.core.types.AuthConnection
4+
5+
data class AuthConnectionLogin(
6+
val name: String,
7+
val authConnection: AuthConnection
8+
)

app/src/main/java/com/web3auth/app/LoginVerifier.kt

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/src/main/java/com/web3auth/app/MainActivity.kt

Lines changed: 125 additions & 77 deletions
Large diffs are not rendered by default.

app/src/main/res/layout/activity_main.xml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
tools:context="com.web3auth.app.MainActivity">
88

99
<com.google.android.material.textfield.TextInputLayout
10-
android:id="@+id/verifierList"
10+
android:id="@+id/authConnectionList"
1111
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
1212
android:layout_width="match_parent"
1313
android:layout_height="wrap_content"
@@ -39,7 +39,7 @@
3939
android:backgroundTint="@color/black"
4040
app:layout_constraintStart_toStartOf="parent"
4141
app:layout_constraintEnd_toEndOf="parent"
42-
app:layout_constraintTop_toBottomOf="@id/verifierList" />
42+
app:layout_constraintTop_toBottomOf="@id/authConnectionList" />
4343

4444

4545
<TextView
@@ -66,7 +66,20 @@
6666
app:layout_constraintEnd_toEndOf="parent"
6767
app:layout_constraintStart_toStartOf="parent"
6868
app:layout_constraintTop_toTopOf="parent"
69-
app:layout_constraintBottom_toBottomOf="parent"/>
69+
app:layout_constraintBottom_toBottomOf="parent" />
70+
71+
<Button
72+
android:id="@+id/sfaSignInButton"
73+
android:layout_width="match_parent"
74+
android:layout_height="wrap_content"
75+
android:layout_marginStart="40dp"
76+
android:layout_marginEnd="40dp"
77+
android:layout_marginBottom="8dp"
78+
android:text="SFA Sign In"
79+
android:textAllCaps="false"
80+
app:layout_constraintEnd_toEndOf="parent"
81+
app:layout_constraintStart_toStartOf="parent"
82+
app:layout_constraintTop_toBottomOf="@+id/signInButton" />
7083

7184
<Button
7285
android:id="@+id/signOutButton"

core/build.gradle

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ android {
1717
}
1818

1919
buildTypes {
20+
debug {
21+
minifyEnabled false
22+
debuggable true
23+
}
2024
release {
21-
minifyEnabled true
25+
minifyEnabled false
26+
shrinkResources false
27+
debuggable true
2228
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23-
consumerProguardFiles 'proguard-rules.pro', 'gson.pro', 'retrofit2.pro'
29+
consumerProguardFiles 'proguard-rules.pro', 'gson.pro', 'retrofit2.pro', 'consumer-rules.pro'
2430
}
2531
}
2632
compileOptions {
@@ -74,17 +80,32 @@ dependencies {
7480

7581
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01"
7682

83+
//analytics library
84+
implementation "com.segment.analytics.android:analytics:4.11.3"
85+
86+
api 'org.torusresearch:torus-utils-java:4.0.3'
87+
api 'org.torusresearch:fetch-node-details-java:5.0.0'
88+
implementation 'com.auth0.android:jwtdecode:2.0.2'
89+
7790
// Test
7891
testImplementation 'junit:junit:4.+'
7992
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
8093
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
8194
}
8295

83-
project.afterEvaluate {
96+
afterEvaluate {
97+
// 1. Define the sources JAR task
98+
task androidSourcesJar(type: Jar) {
99+
archiveClassifier.set("sources")
100+
from android.sourceSets.main.java.srcDirs
101+
}
102+
103+
// 2. Add sources JAR to the publishing
84104
publishing {
85105
publications {
86106
release(MavenPublication) {
87107
from components.release
108+
artifact androidSourcesJar
88109
}
89110
}
90111
}

core/consumer-rules.pro

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,20 @@
4747
-keep enum com.web3auth.core.types.ErrorCode {
4848
*;
4949
}
50+
51+
-keep @kotlin.Metadata class * { *; }
52+
-keepclassmembers class * {
53+
@kotlin.Metadata *;
54+
}
55+
-keepclassmembers class * {
56+
<init>(...);
57+
}
58+
-keepattributes KotlinMetadata, Signature, InnerClasses, EnclosingMethod, *Annotation*
59+
-keepclassmembers class com.web3auth.core.** {
60+
public <init>(...);
61+
}
62+
-keep @androidx.annotation.Keep class * { *; }
63+
-keepclassmembers class * {
64+
@androidx.annotation.Keep *;
65+
}
66+

0 commit comments

Comments
 (0)