Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade some dependencies #403

Merged
merged 7 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.4.2'
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
12 changes: 6 additions & 6 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdk 33
namespace 'org.fedorahosted.freeotp'
defaultConfig {
applicationId "org.fedorahosted.freeotp"
minSdkVersion 23
Expand Down Expand Up @@ -32,7 +33,8 @@ android {
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// Needed to import Kotlin functions from dependencies e.g. io.fotoapparat
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.0.0'

implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'com.google.android.material:material:1.5.0'
Expand All @@ -43,12 +45,10 @@ dependencies {
implementation 'com.google.zxing:core:3.3.3'
implementation 'me.gosimple:nbvcxz:1.4.2'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.navigation:navigation-fragment:2.5.0'
implementation 'androidx.navigation:navigation-ui:2.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'
androidTestImplementation 'org.mockito:mockito-android:2.23.0'
testImplementation 'org.mockito:mockito-core:2.24.0'
androidTestImplementation 'org.mockito:mockito-android:2.24.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Looper;
import android.util.Log;
import android.util.Pair;

Expand All @@ -12,6 +13,7 @@
import org.json.JSONArray;
import org.json.JSONException;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
Expand Down Expand Up @@ -55,6 +57,14 @@ private int getSize() {
public TokenAdapterTest() throws Token.InvalidUriException {
}

@BeforeClass
public static void setupOnce() {
// Instrumented tests are launched in a dedicated instrumentation thread that does not prepare an Android Looper.
// But it is mandatory here as Adapter will instantiate an Android Handler.
if (Looper.myLooper() == null)
Looper.prepare();
}

@Before
public void setup() {
when(mockContext.getSharedPreferences(anyString(), anyInt()))
Expand Down
5 changes: 2 additions & 3 deletions mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fedorahosted.freeotp">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<supports-screens
android:anyDensity="true"
Expand Down Expand Up @@ -80,4 +79,4 @@
</activity>
</application>

</manifest>
</manifest>
2 changes: 1 addition & 1 deletion mobile/src/main/java/org/fedorahosted/freeotp/Code.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

package org.fedorahosted.freeotp;

import androidx.annotation.Nullable;
import org.fedorahosted.freeotp.utils.Time;
import org.jetbrains.annotations.Nullable;

public class Code {
static class Factory {
Expand Down
Loading