Skip to content

Commit 165f2b2

Browse files
authored
Update Group Chat to Use Dev (#173)
* update the links in android * try to fix releases * point to dev * update the links to correctly access the ports * a few small tweaks
1 parent 1180190 commit 165f2b2

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

.github/workflows/release.yml

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
16+
- name: Configure JDK
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'adopt'
20+
java-version: '17'
1621
- name: Setup Gradle
1722
uses: gradle/actions/setup-gradle@v3
1823
- name: Run build with Gradle Wrapper

example/src/main/java/org/xmtp/android/example/ClientManager.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ object ClientManager {
1818
fun clientOptions(appContext: Context?): ClientOptions {
1919
return ClientOptions(
2020
api = ClientOptions.Api(
21-
XMTPEnvironment.LOCAL,
21+
XMTPEnvironment.DEV,
2222
appVersion = "XMTPAndroidExample/v1.0.0",
23-
isSecure = false
23+
isSecure = true
2424
),
2525
enableAlphaMls = true,
2626
appContext = appContext

library/src/main/java/org/xmtp/android/library/ApiClient.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ data class GRPCApiClient(
9191
private val channel: ManagedChannel =
9292
Grpc.newChannelBuilderForAddress(
9393
environment.getValue(),
94-
5556,
94+
if (environment == XMTPEnvironment.LOCAL) 5556 else 443,
9595
if (secure) {
9696
TlsChannelCredentials.create()
9797
} else {

library/src/main/java/org/xmtp/android/library/Client.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class Client() {
279279
}
280280

281281
private fun isAlphaMlsEnabled(options: ClientOptions?): Boolean {
282-
return (options != null && options.enableAlphaMls && options.api.env == XMTPEnvironment.LOCAL && options.appContext != null)
282+
return (options != null && options.enableAlphaMls && options.api.env != XMTPEnvironment.PRODUCTION && options.appContext != null)
283283
}
284284

285285
private suspend fun ffiXmtpClient(
@@ -324,8 +324,8 @@ class Client() {
324324

325325
createClient(
326326
logger = logger,
327-
host = "http://${options.api.env.getValue()}:5556",
328-
isSecure = false,
327+
host = if (options.api.env == XMTPEnvironment.LOCAL) "http://${options.api.env.getValue()}:5556" else "https://${options.api.env.getValue()}:443",
328+
isSecure = options.api.isSecure,
329329
db = dbPath,
330330
encryptionKey = retrievedKey.encoded,
331331
accountAddress = accountAddress,

library/src/main/java/org/xmtp/android/library/XMTPEnvironment.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package org.xmtp.android.library
22

33
enum class XMTPEnvironment(val rawValue: String) {
4-
DEV("dev.xmtp.network"),
5-
PRODUCTION("production.xmtp.network"),
4+
DEV("grpc.dev.xmtp.network"),
5+
PRODUCTION("grpc.production.xmtp.network"),
66
LOCAL("10.0.2.2") {
77
override fun withValue(value: String): XMTPEnvironment {
88
return LOCAL.apply { customValue = value }

library/src/main/java/org/xmtp/android/library/push/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This example branch can serve as the basis for what you might want to provide fo
3535
--xmtp-listener-tls \
3636
--xmtp-listener \
3737
--api \
38-
-x "production.xmtp.network:5556" \
38+
-x "grpc.production.xmtp.network:443:5556" \
3939
-d "postgres://postgres:xmtp@localhost:25432/postgres?sslmode=disable" \
4040
--fcm-enabled \
4141
--fcm-credentials-json=YOURFCMJSON \

0 commit comments

Comments
 (0)