Skip to content

Commit 7cba30d

Browse files
committed
git: fixed merge conflicts
2 parents 27f7666 + 23d2225 commit 7cba30d

File tree

135 files changed

+2203
-5924
lines changed

Some content is hidden

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

135 files changed

+2203
-5924
lines changed

LICENSE

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
Copyright 2016-2018 Kandra Labs, Inc., and contributors
2-
3-
Licensed under the Apache License, Version 2.0 (the "License");
4-
you may not use this software except in compliance with the License.
5-
You may obtain a copy of the License at
6-
7-
http://www.apache.org/licenses/LICENSE-2.0
8-
9-
Unless required by applicable law or agreed to in writing, software
10-
distributed under the License is distributed on an "AS IS" BASIS,
11-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
See the License for the specific language governing permissions and
13-
limitations under the License.
14-
15-
The software includes some works released by third parties under other
16-
free and open source licenses. Those works are redistributed under the
17-
license terms under which the works were received. For more details,
18-
see the ``docs/THIRDPARTY`` file included with this distribution.
19-
20-
--------------------------------------------------------------------------------
211

222
Apache License
233
Version 2.0, January 2004

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Zulip Mobile supersedes two legacy Zulip apps,
8585

8686
## License
8787

88-
Copyright (c) 2016-2018 Kandra Labs, Inc., and contributors, and 2016 Dropbox, Inc.
88+
Copyright (c) 2016-2022 Kandra Labs, Inc., and contributors, and 2016 Dropbox, Inc.
8989

9090
Licensed under the Apache License, Version 2.0 (the "License");
9191
you may not use this file except in compliance with the License.

android/app/build.gradle

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,25 @@ def jscFlavor = 'org.webkit:android-jsc-intl:+'
130130
*/
131131
def enableHermes = project.ext.react.get("enableHermes", false);
132132

133+
/**
134+
* Architectures to build native code for.
135+
*/
136+
def reactNativeArchitectures() {
137+
def value = project.getProperties().get("reactNativeArchitectures")
138+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
139+
}
140+
141+
// Useful for syncing dependency versions from RN upstream.
142+
def rnProperties = new Properties()
143+
rnProperties.load(new FileInputStream(file("../../node_modules/react-native/ReactAndroid/gradle.properties")))
144+
133145
android {
134146
defaultConfig {
135147
applicationId "com.zulipmobile"
136148
minSdkVersion rootProject.ext.minSdkVersion
137149
targetSdkVersion rootProject.ext.targetSdkVersion
138-
versionCode 196
139-
versionName "27.196"
150+
versionCode 197
151+
versionName "27.197"
140152
}
141153
signingConfigs {
142154
// The RN v0.60 template app suggests configuring a debug
@@ -164,7 +176,7 @@ android {
164176
reset()
165177
enable true // Build a separate APK for each ABI.
166178
universalApk false // If true, also generate a universal APK
167-
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
179+
include (*reactNativeArchitectures())
168180
}
169181
}
170182
buildTypes {
@@ -194,23 +206,34 @@ repositories {
194206
}
195207

196208
dependencies {
197-
implementation fileTree(dir: "libs", include: ["*.jar"])
198209
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
210+
199211
implementation "androidx.core:core-ktx:1.7.0"
200212
implementation 'androidx.appcompat:appcompat:1.0.0'
201-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
213+
implementation 'androidx.browser:browser:1.0.0'
214+
202215
implementation "com.google.firebase:firebase-messaging:17.3.4"
216+
217+
// ==== Test dependencies
218+
testImplementation 'junit:junit:4.12'
219+
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.0'
220+
testImplementation 'com.google.truth:truth:0.43'
221+
testImplementation 'com.google.truth.extensions:truth-java8-extension:0.43'
222+
testImplementation 'org.mockito:mockito-core:1.10.19'
223+
224+
// ==== RN-related dependencies
225+
226+
// For animated GIF support:
227+
implementation "com.facebook.fresco:animated-gif:${rnProperties.get('FRESCO_VERSION')}"
228+
229+
// ----------------------------------------
230+
// Dependencies from RN upstream, in the template app
231+
232+
implementation fileTree(dir: "libs", include: ["*.jar"])
203233
//noinspection GradleDynamicVersion
204234
implementation "com.facebook.react:react-native:+" // From node_modules
205235

206-
// Workaround for facebook/react-native#32735; see
207-
// https://github.com/facebook/react-native/issues/32735#issue-1077061487
208-
// TODO(react-native-68): Remove; fixed in facebook/react-native@f45889ef9
209-
implementation('com.facebook.soloader:soloader:0.10.3') {
210-
version {
211-
strictly '0.10.3'
212-
}
213-
}
236+
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
214237

215238
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
216239
exclude group: 'com.facebook.fbjni'
@@ -232,15 +255,10 @@ dependencies {
232255
} else {
233256
implementation jscFlavor
234257
}
258+
// END dependencies from RN upstream
259+
// ----------------------------------------
235260

236-
implementation 'com.facebook.fresco:animated-gif:2.0.0' // For animated GIF support
237-
implementation 'androidx.browser:browser:1.0.0'
238-
239-
testImplementation 'junit:junit:4.12'
240-
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.0'
241-
testImplementation 'com.google.truth:truth:0.43'
242-
testImplementation 'com.google.truth.extensions:truth-java8-extension:0.43'
243-
testImplementation 'org.mockito:mockito-core:1.10.19'
261+
// Don't put new dependencies down here. Put them above, before the upstream section.
244262
}
245263

246264
// The default kotlinOptions.jvmTarget is 1.6. With the default, we get

android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
tools:remove="android:networkSecurityConfig"
99
tools:ignore="GoogleAppIndexingWarning"
1010
tools:targetApi="28">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
11+
<activity
12+
android:name="com.facebook.react.devsupport.DevSettingsActivity"
13+
android:exported="false" />
1214
</application>
1315
</manifest>

android/app/src/debug/java/com/zulipmobile/ReactNativeFlipper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) Facebook, Inc. and its affiliates.
2+
* Copyright (c) Meta Platforms, Inc. and its affiliates.
33
*
44
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
55
* directory of this source tree.
@@ -19,6 +19,7 @@
1919
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
2020
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
2121
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22+
import com.facebook.react.ReactInstanceEventListener;
2223
import com.facebook.react.ReactInstanceManager;
2324
import com.facebook.react.bridge.ReactContext;
2425
import com.facebook.react.modules.network.NetworkingModule;
@@ -51,7 +52,7 @@ public void apply(OkHttpClient.Builder builder) {
5152
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
5253
if (reactContext == null) {
5354
reactInstanceManager.addReactInstanceEventListener(
54-
new ReactInstanceManager.ReactInstanceEventListener() {
55+
new ReactInstanceEventListener() {
5556
@Override
5657
public void onReactContextInitialized(ReactContext reactContext) {
5758
reactInstanceManager.removeReactInstanceEventListener(this);

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ buildscript {
2727
}
2828
dependencies {
2929
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
30-
classpath 'com.android.tools.build:gradle:7.0.1'
30+
classpath 'com.android.tools.build:gradle:7.0.4'
3131

3232
// NOTE: Do not place your application dependencies here; they belong
3333
// in the individual module build.gradle files

android/gradle.properties

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m
1414
# We allow more space (no MaxMetaspaceSize; bigger -Xmx),
1515
# and don't litter heap dumps if that still proves insufficient.
16-
org.gradle.jvmargs=-Xms256m -Xmx1024m
16+
org.gradle.jvmargs=-Xms256m -Xmx1280m
1717

1818
# When configured, Gradle will run in incubating parallel mode.
1919
# This option should only be used with decoupled projects. More details, visit
@@ -28,4 +28,9 @@ android.useAndroidX=true
2828
android.enableJetifier=true
2929

3030
# Version of flipper SDK to use with React Native
31-
FLIPPER_VERSION=0.99.0
31+
FLIPPER_VERSION=0.125.0
32+
33+
# Use this property to specify which architecture you want to build.
34+
# You can also override it from the CLI using
35+
# tools/gradle <task> -PreactNativeArchitectures=x86_64
36+
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# How to upgrade Gradle:
2-
# $ ./gradlew wrapper --distribution-type=all --gradle-version=NEW_VERSION
3-
# $ ./gradlew wrapper --distribution-type=all --gradle-version=NEW_VERSION
2+
# $ tools/gradle wrapper --distribution-type=all --gradle-version=NEW_VERSION
3+
# $ tools/gradle wrapper --distribution-type=all --gradle-version=NEW_VERSION
44
# (Yep, run the same command twice. The first updates this file so we use
55
# the new Gradle; the second updates the wrapper's jar and scripts, so that
66
# the wrapper is the one from the new Gradle too.)
77
distributionBase=GRADLE_USER_HOME
88
distributionPath=wrapper/dists
9-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
9+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
1010
zipStoreBase=GRADLE_USER_HOME
1111
zipStorePath=wrapper/dists

docs/changelog.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,39 @@ It doesn't include
4040
## Unreleased
4141

4242

43+
## 27.197 (2022-12-14)
44+
45+
### Highlights for users
46+
47+
* Streams in the inbox view now have a "collapse" button that hides unread
48+
topics, so you can see more streams at a time. (#5423)
49+
* In the profile view, you can now copy custom profile fields to the
50+
clipboard. (#5592)
51+
52+
Plus, like every release, other fixes and improvements for your Zulip
53+
experience.
54+
55+
56+
### Highlights for developers
57+
58+
* Upgraded to React Native v0.68! (#5610)
59+
60+
* Added a workaround for an iOS build error with "signing requires
61+
development team". (PR #5576)
62+
63+
* Upgraded to Jest 27. (PR #5581)
64+
65+
* Upgraded to TsFlower 0.0.13. (PR #5583)
66+
67+
* New `tools/gradle` script, to avoid `cd android`. (PR #5603)
68+
69+
* We now allow Gradle to use 25% more memory, apparently needed for RN
70+
v0.68, which we hope to upgrade to soon. (PR #5603)
71+
72+
* Resolved issues: #5610, #5592, #5597, #5596, #3469, #5583, #5581, #4386,
73+
#5423
74+
75+
4376
## 27.196 (2022-12-01)
4477

4578
### Highlights for users

docs/howto/build-run.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ java.nio.file.NoSuchFileException: /Users/chrisbobbe/dev/zulip-mobile/android/ap
280280
at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:407)
281281
```
282282

283-
Try removing `android/.gradle`, running `./gradlew clean` from
284-
`android/`, and building again.
283+
Try removing `android/.gradle`, running `tools/gradle clean`,
284+
and building again.
285285

286286
### Build failure: No file known for: classes.dex
287287

@@ -293,8 +293,8 @@ Execution failed for task ':app:packageDebug'.
293293
> No file known for: classes.dex
294294
```
295295

296-
Try removing `android/.gradle`, running `./gradlew clean` from
297-
`android/`, and building again.
296+
Try removing `android/.gradle`, running `tools/gradle clean`,
297+
and building again.
298298

299299
### Build failure: java.lang.UnsupportedClassVersionError, "Unsupported major.minor version 52.0"
300300

@@ -343,7 +343,7 @@ Could not compile build file '/Users/chrisbobbe/dev/zulip-mobile/node_modules/@u
343343
This can sometimes happen if you're using JDK 13 to invoke the build
344344
command (e.g., when calling `tools/run-android`, or
345345
`tools/test native`, or
346-
`android/gradlew -p android :app:assembleDebug`). You can check the
346+
`tools/gradle :app:assembleDebug`). You can check the
347347
version by running `java -version`. It seems that upgrading to
348348
macOS 10.15 Catalina automatically upgrades Java to 13.
349349

@@ -686,7 +686,7 @@ Sometimes, the build cache from previous builds can cause issues, and cleaning
686686
it can help:
687687

688688
```
689-
cd android && ./gradlew clean
689+
tools/gradle clean
690690
```
691691

692692
Optionally, reset iOS simulator:

ios/Podfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ require_relative '../node_modules/expo/scripts/autolinking.rb'
66
require_relative '../node_modules/react-native/scripts/react_native_pods'
77
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
88

9+
install! 'cocoapods', :deterministic_uuids => false
10+
911
target 'ZulipMobile' do
1012
config = use_native_modules!
1113

14+
# Flags change depending on the env values.
15+
flags = get_default_flags()
16+
1217
use_react_native!(
1318
:path => config[:reactNativePath],
1419
# to enable hermes on iOS, change `false` to `true` and then install pods
15-
:hermes_enabled => false
20+
:hermes_enabled => flags[:hermes_enabled],
21+
:fabric_enabled => flags[:fabric_enabled],
22+
# An absolute path to your application root.
23+
:app_path => "#{Pod::Config.instance.installation_root}/.."
1624
)
1725

1826
# Enables Flipper.

0 commit comments

Comments
 (0)