Skip to content
Open
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 .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.19.0"
"flutter": "3.35.6"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build/

# FVM
.fvm/
.fvmrc

# Android related
**/android/**/gradle-wrapper.jar
Expand Down
32 changes: 17 additions & 15 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'ru.surfstudio.otp_autofill'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.9.23'
ext.kotlin_version = '2.1.20'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.5.1'
classpath 'com.android.tools.build:gradle:8.13.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -23,36 +23,38 @@ allprojects {

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
if (project.android.hasProperty("namespace")) {
namespace 'ru.surfstudio.otp_autofill'
}

compileSdkVersion 33
compileSdkVersion 36

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = "17"
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}

defaultConfig {
minSdkVersion 19
targetSdkVersion 36
if (project.android.hasProperty('namespace')) {
namespace 'ru.surfstudio.otp_autofill'
}
}

dependencies {
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.gms:play-services-auth:20.3.0'
implementation 'com.google.android.gms:play-services-auth-api-phone:17.4.0'
implementation "androidx.activity:activity:1.5.1"
implementation "androidx.fragment:fragment:1.5.4"
}
}
}
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
# android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
4 changes: 3 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AppSignatureHelper(context: Context) : ContextWrapper(context) {
val packageManager = packageManager
val signatures = packageManager.getPackageInfo(packageName,
PackageManager.GET_SIGNATURES).signatures
signatures.mapNotNull { hash(packageName, it.toCharsString()) }
signatures?.mapNotNull { hash(packageName, it.toCharsString()) } ?: return ArrayList()
} catch (e: PackageManager.NameNotFoundException) {
emptyList()
}
Expand All @@ -35,7 +35,7 @@ class AppSignatureHelper(context: Context) : ContextWrapper(context) {
messageDigest.update(appInfo.toByteArray(StandardCharsets.UTF_8))
val hashSignature = messageDigest.digest().copyOfRange(0, NUM_HASHED_BYTES)
var base64Hash = Base64.encodeToString(hashSignature, Base64.NO_PADDING or Base64.NO_WRAP)
base64Hash = base64Hash.substring(0, NUM_BASE64_CHAR)
base64Hash = base64Hash.take(NUM_BASE64_CHAR)
base64Hash
} catch (e: NoSuchAlgorithmException) {
null
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ dev_dependencies:
flutter_test:
sdk: flutter

mocktail: ^0.2.0
surf_lint_rules: ^2.0.0
mocktail: ^1.0.4
surf_lint_rules: ^4.0.0

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down