Skip to content

Commit

Permalink
Merge pull request #1643 from oxen-io/release/1.19.2
Browse files Browse the repository at this point in the history
Release/1.19.2
  • Loading branch information
ThomasSession authored Aug 25, 2024
2 parents e5ee2e1 + a50e304 commit fd0f9ea
Show file tree
Hide file tree
Showing 402 changed files with 2,854 additions and 6,271 deletions.
87 changes: 31 additions & 56 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@

buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$gradlePluginVersion"
classpath files('libs/gradle-witness.jar')
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
classpath "com.google.gms:google-services:$googleServicesVersion"
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerVersion"
}
}

plugins {
id 'kotlin-kapt'
id 'com.google.devtools.ksp'
id 'com.google.dagger.hilt.android'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'witness'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlinx-serialization'
apply plugin: 'dagger.hilt.android.plugin'

configurations.all {
exclude module: "commons-logging"
configurations.forEach {
it.exclude module: "commons-logging"
}

def canonicalVersionCode = 379
def canonicalVersionName = "1.19.1"
def canonicalVersionCode = 380
def canonicalVersionName = "1.19.2"

def postFixSize = 10
def abiPostFix = ['armeabi-v7a' : 1,
Expand Down Expand Up @@ -67,13 +49,9 @@ android {
}

packagingOptions {
exclude 'LICENSE.txt'
exclude 'LICENSE'
exclude 'NOTICE'
exclude 'asm-license.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/proguard/androidx-annotations.pro'
resources {
excludes += ['LICENSE.txt', 'LICENSE', 'NOTICE', 'asm-license.txt', 'META-INF/LICENSE', 'META-INF/NOTICE', 'META-INF/proguard/androidx-annotations.pro']
}
}

splits {
Expand All @@ -88,8 +66,9 @@ android {
buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion '1.4.7'
kotlinCompilerExtensionVersion '1.5.14'
}

defaultConfig {
Expand All @@ -111,8 +90,8 @@ android {
buildConfigField "String", "USER_AGENT", "\"OWA\""
buildConfigField "String[]", "LANGUAGES", "new String[]{\"" + autoResConfig().collect { s -> s.replace('-r', '_') }.join('", "') + '"}'
buildConfigField "int", "CANONICAL_VERSION_CODE", "$canonicalVersionCode"
resourceConfigurations += []

resConfigs autoResConfig()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// The following argument makes the Android Test Orchestrator run its
// "pm clear" command after each test invocation. This command ensures
Expand Down Expand Up @@ -172,7 +151,7 @@ android {
}
}

applicationVariants.all { variant ->
applicationVariants.forEach { variant ->
variant.outputs.each { output ->
def abiName = output.getFilter("ABI") ?: 'universal'
def postFix = abiPostFix.get(abiName, 0)
Expand All @@ -183,10 +162,6 @@ android {
}
}

lintOptions {
abortOnError true
baseline file("lint-baseline.xml")
}

testOptions {
unitTests {
Expand All @@ -195,7 +170,6 @@ android {
}

buildFeatures {
dataBinding true
viewBinding true
}

Expand All @@ -215,9 +189,11 @@ android {
}
}

task testPlayDebugUnitTestCoverageReport(type: JacocoReport, dependsOn: "testPlayDebugUnitTest") {
tasks.register('testPlayDebugUnitTestCoverageReport', JacocoReport) {
dependsOn 'testPlayDebugUnitTest'

reports {
xml.enabled = true
xml.required = true
}

// Add files that should not be listed in the report (e.g. generated Files from dagger)
Expand All @@ -235,12 +211,20 @@ android {
// This is enabled with 'enableUnitTestCoverage' in the 'debug' build type.
executionData.from = "${project.buildDir}/outputs/unit_test_code_coverage/playDebugUnitTest/testPlayDebugUnitTest.exec"
}


testNamespace 'network.loki.messenger.test'
lint {
abortOnError true
baseline file('lint-baseline.xml')
}
}

dependencies {

implementation("com.google.dagger:hilt-android:2.46.1")
kapt("com.google.dagger:hilt-android-compiler:2.44")
implementation("com.google.dagger:hilt-android:$daggerHiltVersion")
ksp("com.google.dagger:hilt-compiler:$daggerHiltVersion")
ksp("androidx.hilt:hilt-compiler:$jetpackHiltVersion")

implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation 'androidx.recyclerview:recyclerview:1.2.1'
Expand All @@ -260,6 +244,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.paging:paging-runtime-ktx:$pagingVersion"
implementation 'androidx.activity:activity-ktx:1.5.1'
implementation 'androidx.activity:activity-compose:1.5.1'
implementation 'androidx.fragment:fragment-ktx:1.5.3'
implementation "androidx.core:core-ktx:$coreVersion"
implementation "androidx.work:work-runtime-ktx:2.7.1"
Expand All @@ -281,18 +266,14 @@ dependencies {
implementation 'commons-net:commons-net:3.7.2'
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
implementation "com.github.bumptech.glide:glide:$glideVersion"
annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
implementation "com.github.bumptech.glide:compose:1.0.0-beta01"
ksp "com.github.bumptech.glide:ksp:$glideVersion"
implementation 'com.makeramen:roundedimageview:2.1.0'
implementation 'com.pnikosis:materialish-progress:1.5'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'pl.tajchert:waitingdots:0.1.0'
implementation 'com.vanniktech:android-image-cropper:4.5.0'
implementation 'com.melnykov:floatingactionbutton:1.3.0'
implementation 'com.google.zxing:android-integration:3.1.0'
implementation "com.google.dagger:hilt-android:$daggerVersion"
kapt "com.google.dagger:hilt-compiler:$daggerVersion"
implementation 'com.google.zxing:core:3.2.1'
implementation ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') {
exclude group: 'com.android.support', module: 'support-annotations'
}
Expand All @@ -304,7 +285,6 @@ dependencies {
exclude group: 'com.squareup.okhttp', module: 'okhttp-urlconnection'
}
implementation 'com.annimon:stream:1.1.8'
implementation project(':stickyheader')
implementation 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3-S2'
implementation 'androidx.sqlite:sqlite-ktx:2.3.1'
implementation 'net.zetetic:sqlcipher-android:4.5.4@aar'
Expand Down Expand Up @@ -370,7 +350,6 @@ dependencies {
testImplementation 'org.conscrypt:conscrypt-openjdk-uber:2.5.2' // For Robolectric
testImplementation 'app.cash.turbine:turbine:1.1.0'


implementation 'com.github.bumptech.glide:compose:1.0.0-alpha.5'
implementation "androidx.compose.ui:ui:$composeVersion"
implementation "androidx.compose.animation:animation:$composeVersion"
Expand All @@ -389,7 +368,8 @@ dependencies {
implementation "androidx.camera:camera-lifecycle:1.3.2"
implementation "androidx.camera:camera-view:1.3.2"

implementation "com.google.mlkit:barcode-scanning:17.2.0"
// Note: ZXing 3.5.3 is the latest stable release as of 2024/08/21
implementation "com.google.zxing:core:$zxingVersion"
}

static def getLastCommitTimestamp() {
Expand All @@ -410,8 +390,3 @@ def autoResConfig() {
.collect { matcher -> matcher.group(1) }
.sort()
}

// Allow references to generated code
kapt {
correctErrorTypes = true
}
3 changes: 1 addition & 2 deletions app/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="network.loki.messenger.test">
xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<uses-library android:name="android.test.runner"
android:required="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ import org.session.libsignal.utilities.guava.Optional
import org.thoughtcrime.securesms.conversation.v2.ConversationActivityV2
import org.thoughtcrime.securesms.conversation.v2.input_bar.InputBar
import org.thoughtcrime.securesms.home.HomeActivity
import org.thoughtcrime.securesms.mms.GlideApp
import com.bumptech.glide.Glide

/**
* Currently not used as part of our CI/Deployment processes !!!!
*/

@RunWith(AndroidJUnit4::class)
@LargeTest
Expand Down Expand Up @@ -71,7 +75,7 @@ class HomeActivityTests {
onView(allOf(isDescendantOfA(withId(R.id.inputBar)),withId(R.id.inputBarEditText))).perform(ViewActions.replaceText(messageToSend))
if (linkPreview != null) {
val activity = activityMonitor.waitForActivity() as ConversationActivityV2
val glide = GlideApp.with(activity)
val glide = Glide.with(activity)
activity.findViewById<InputBar>(R.id.inputBar).updateLinkPreviewDraft(glide, linkPreview)
}
onView(allOf(isDescendantOfA(withId(R.id.inputBar)),inputButtonWithDrawable(R.drawable.ic_arrow_up))).perform(ViewActions.click())
Expand Down Expand Up @@ -107,7 +111,7 @@ class HomeActivityTests {
}


private fun goToMyChat() {
/* private fun goToMyChat() {
onView(withId(R.id.newConversationButton)).perform(ViewActions.click())
onView(withId(R.id.createPrivateChatButton)).perform(ViewActions.click())
// new chat
Expand All @@ -122,7 +126,7 @@ class HomeActivityTests {
onView(withId(R.id.publicKeyEditText)).perform(ViewActions.typeText(copied))
onView(withId(R.id.publicKeyEditText)).perform(ViewActions.closeSoftKeyboard())
onView(withId(R.id.createPrivateChatButton)).perform(ViewActions.click())
}
}*/

@Test
fun testLaunches_dismiss_seedView() {
Expand All @@ -145,7 +149,7 @@ class HomeActivityTests {
onView(withId(R.id.seedReminderView)).check(matches(not(isDisplayed())))
}

@Test
/* @Test
fun testChat_withSelf() {
setupLoggedInState()
goToMyChat()
Expand Down Expand Up @@ -176,7 +180,7 @@ class HomeActivityTests {
onView(isRoot()).perform(waitFor(1000)) // no other way for this to work apparently
onView(withText(dialogPromptText)).check(matches(isDisplayed()))
}
}*/

/**
* Perform action of waiting for a specific time.
Expand Down
11 changes: 3 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,6 @@
android:name="org.thoughtcrime.securesms.scribbles.StickerSelectActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:theme="@style/Theme.Session.ForceDark" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat" />
<activity
android:name="org.thoughtcrime.securesms.ShortcutLauncherActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
Expand All @@ -310,6 +306,8 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="org.thoughtcrime.securesms.home.HomeActivity" />
</activity>
<activity android:name="org.thoughtcrime.securesms.media.MediaOverviewActivity" />

<service android:enabled="true" android:name="org.thoughtcrime.securesms.service.WebRtcCallService"
android:foregroundServiceType="microphone"
android:exported="false" />
Expand All @@ -328,7 +326,6 @@
<action android:name="android.service.chooser.ChooserTargetService" />
</intent-filter>
</service>
<service android:name="org.thoughtcrime.securesms.service.GenericForegroundService" />
<receiver
android:name="org.thoughtcrime.securesms.notifications.MarkReadReceiver"
android:enabled="true"
Expand Down Expand Up @@ -440,9 +437,7 @@
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service
android:name="org.thoughtcrime.securesms.jobmanager.KeepAliveService"
android:enabled="@bool/enable_alarm_manager" />

<uses-library
android:name="com.sec.android.app.multiwindow"
android:required="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import androidx.annotation.NonNull;

import androidx.fragment.app.FragmentActivity;
import android.view.KeyEvent;

import org.session.libsession.utilities.TextSecurePreferences;
import org.session.libsession.utilities.dynamiclanguage.DynamicLanguageActivityHelper;
Expand Down
Loading

0 comments on commit fd0f9ea

Please sign in to comment.