Skip to content

Commit

Permalink
Update Gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesSmartCell committed Jul 10, 2024
1 parent ebae23c commit 2748b19
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 20 deletions.
7 changes: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,15 @@ dependencies {
exclude group: 'org.bouncycastle', module: '*'
})

implementation libs.review
implementation libs.app.update

runtimeOnly libs.work.runtime.ktx

//Analytics
analyticsImplementation libs.play.core
//analyticsImplementation libs.play.core

analyticsImplementation libs.play.core
//analyticsImplementation libs.play.core
analyticsImplementation libs.firebase.analytics
analyticsImplementation libs.mixpanel.android
analyticsImplementation libs.firebase.crashlytics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

import com.alphawallet.app.R;
import com.alphawallet.app.repository.PreferenceRepositoryType;
import com.google.android.gms.tasks.Task;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.play.core.review.ReviewInfo;
import com.google.android.play.core.review.ReviewManager;
import com.google.android.play.core.review.ReviewManagerFactory;
import com.google.android.play.core.tasks.Task;

public class RateApp {
// should be shown on 5th run or after the first transaction (afterTransaction == true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import android.app.Activity;

import com.alphawallet.app.entity.FragmentMessenger;
import com.google.android.gms.tasks.Task;
import com.google.android.play.core.appupdate.AppUpdateInfo;
import com.google.android.play.core.appupdate.AppUpdateManager;
import com.google.android.play.core.appupdate.AppUpdateManagerFactory;
import com.google.android.play.core.appupdate.AppUpdateOptions;
import com.google.android.play.core.install.model.AppUpdateType;
import com.google.android.play.core.install.model.UpdateAvailability;
import com.google.android.play.core.tasks.Task;

public class UpdateUtils {
public static void checkForUpdates(Activity context, FragmentMessenger messenger) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ private Request buildRequest(String api, boolean useAlt)
.addHeader("Content-Type", "application/json")
.addHeader("Ok-Access-Key", useAlt ? KeyProviderFactory.get().getOkLBKey() : KeyProviderFactory.get().getOkLinkKey())
.get();

String baba = KeyProviderFactory.get().getOkLBKey();

return requestB.build();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.alphawallet.app.service;

import static com.alphawallet.app.repository.TokensRealmSource.databaseKey;
import static com.alphawallet.ethereum.EthereumNetworkBase.KLAYTN_ID;
import static com.alphawallet.ethereum.EthereumNetworkBase.MAINNET_ID;

import android.text.TextUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
import com.walletconnect.web3.wallet.client.Wallet.Model.Session;
import com.walletconnect.web3.wallet.client.Web3Wallet;

import org.json.JSONException;
import org.json.JSONObject;
import org.web3j.utils.Numeric;

import java.util.ArrayList;
Expand Down Expand Up @@ -141,7 +143,7 @@ private Session getSession(String topic)

try
{
listOfSettledSessions = Web3Wallet.INSTANCE.getListOfActiveSessions();
listOfSettledSessions = Web3Wallet.getListOfActiveSessions();
}
catch (IllegalStateException e)
{
Expand Down Expand Up @@ -221,7 +223,7 @@ private Map<String, Model.Namespace.Session> buildNamespaces(Model.SessionPropos

private List<String> getSupportedMethods()
{
return Arrays.asList("eth_sendTransaction", "eth_signTransaction", "eth_signTypedData", "eth_signTypedData_v3", "eth_signTypedData_v4", "personal_sign", "eth_sign");
return Arrays.asList("eth_sendTransaction", "eth_signTransaction", "eth_signTypedData", "eth_signTypedData_v3", "eth_signTypedData_v4", "personal_sign", "eth_sign", "wallet_switchEthereumChain");
}

private List<String> getSupportedEvents()
Expand Down Expand Up @@ -574,6 +576,7 @@ public void dismissed(String txHash, long callbackId, boolean actionCompleted)
}
else
{
// TODO: Update the libs
Web3Wallet.INSTANCE.respondAuthRequest(new Params.AuthRequestResponse.Error(requestId, 0, "User rejected request."), (authRequestResponse) -> {
closeWalletConnectActivity();
return null;
Expand Down Expand Up @@ -678,6 +681,26 @@ public void onSessionRequest(@NonNull Model.SessionRequest sessionRequest, @NonN
{
String checkMethod;
String method = sessionRequest.getRequest().getMethod();
if (method.equals("wallet_switchEthereumChain"))
{
//does AW support this chain? If so then proceed.
JSONObject response = new JSONObject();
try
{
response.put("jsonrpc", "2.0");
response.put("id", sessionRequest.request.id);
response.put("result", "null");
}
catch (JSONException e)
{
//
}

//how to respond affirmative?
approve(sessionRequest, response.toString());
return;
}

if (method.startsWith("eth_signTypedData"))
{
checkMethod = "eth_signTypedData";
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-my/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@
<string name="safe_transfer">လုံခြုံစွာပြောင်းရွှေ့မည်</string>
<string name="selected_tokens">ရွေးချယ်ထားသောတိုကင်များ</string>
<string name="send_tokens">တိုကင်များကိုပို့မည်</string>
<string name="rate_prompt">အသုံးပြုသည်ကိုကျေနပ်မှုရှိလျှင် ကျေးဇူးပြု၍ ကျွန်တော်တို့အားအဆင့်သတ်မှတ်ပေး၍ကူညီပါ။</string>
<string name="rate_prompt">%1$s ကိုအသုံးပြုရတာကို နှစ်သက်တယ်ဆိုရင် အဆင့်သတ်မှတ်ခြင်းအားဖြင့် ကျေးဇူးပြု၍ ကူညီပေးပါ။</string>
<string name="rate_later">နောက်မှ</string>
<string name="rate_rate">အဆင့်သတ်မှတ်သည်</string>
<string name="rate_no_thanks">မပြုလုပ်ပါ၊ ကျေးဇူးတင်ပါသည်။</string>
Expand Down
26 changes: 14 additions & 12 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,62 +1,64 @@
[versions]
agp = "8.3.2"
agp = "8.5.0"
android_lint_reporter = "2.1.0"
androidBom = "1.23.0"
appUpdate = "2.1.0"
bcprovJdk15onVersion = "1.70"
bcprovJdk18onVersion = "1.77"
biometric = "1.1.0"
compiler = "4.16.0"
core = "3.5.3"
coreSplashscreen = "1.0.1"
coreVersion = "1.10.3"
detektGradlePlugin = "1.23.5"
firebaseAnalytics = "21.5.1"
firebaseCrashlytics = "18.6.2"
firebaseCrashlyticsGradle = "2.9.9"
firebaseMessaging = "23.4.1"
flexboxLayout = "2.0.1"
glide = "4.16.0"
googleServices = "4.4.1"
gradle = "8.3.2"
googleServices = "4.4.2"
gradle = "8.5.0"
gridlayout = "1.0.0"
gson = "2.10.1"
guava = "30.1.1-android"
guava = "31.1-android"
hiltAndroidGradlePlugin = "2.48"
jacocoAndroid = "0.1.5"
jsonSimple = "4.0.1"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
appcompat = "1.7.0"
keyboardvisibilityevent = "3.0.0-RC3"
kotlinGradlePlugin = "1.8.0"
kotson = "2.5.0"
mailchimpSdkAndroid = "1.0.0"
material = "1.11.0"
material = "1.12.0"
constraintlayout = "2.1.4"
lifecycleLivedataKtx = "2.7.0"
lifecycleViewmodelKtx = "2.7.0"
lifecycleLivedataKtx = "2.8.3"
lifecycleViewmodelKtx = "2.8.3"
mixpanelAndroid = "5.8.4"
navigationFragment = "2.7.7"
navigationUi = "2.7.7"
okhttp = "4.12.0"
preferenceKtx = "1.2.1"
realmGradlePlugin = "10.18.0"
recyclerview = "1.3.2"
review = "2.0.1"
rxjava = "2.2.21"
rxandroid = "2.1.1"
slf4jApi = "2.0.9"
springBootGradlePlugin = "2.2.2.RELEASE"
timber = "5.0.1"
vectordrawable = "1.1.0"
vectordrawable = "1.2.0"
walletCore = "3.2.18"
webkit = "1.10.0"
webkit = "1.11.0"
workRuntimeKtx = "2.9.0"
zxingAndroidEmbedded = "4.3.0"

[libraries]
android-bom = { module = "com.walletconnect:android-bom", version.ref = "androidBom" }
android_lint_reporter = { module = "gradle.plugin.com.worker8.android_lint_reporter:android_lint_reporter", version.ref = "android_lint_reporter" }
app-update = { module = "com.google.android.play:app-update", version.ref = "appUpdate" }
biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
bouncycastle-bcprov-jdk15on = { module = "org.bouncycastle:bcprov-jdk15on", version.ref = "bcprovJdk15onVersion" }
bouncycastle-bcprov-jdk18on = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bcprovJdk18onVersion" }
Expand Down Expand Up @@ -96,10 +98,10 @@ mixpanel-android = { module = "com.mixpanel.android:mixpanel-android", version.r
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "navigationUi" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
play-core = { module = "com.google.android.play:core", version.ref = "coreVersion" }
preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" }
realm-gradle-plugin = { module = "io.realm:realm-gradle-plugin", version.ref = "realmGradlePlugin" }
recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
review = { module = "com.google.android.play:review", version.ref = "review" }
rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "rxjava" }
rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxandroid" }
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4jApi" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Mar 09 17:11:16 AEDT 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

0 comments on commit 2748b19

Please sign in to comment.