diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef5ac690..bc5d2d09 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,11 +10,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout latest commit - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup java environment - uses: actions/setup-java@v1 - with: { java-version: 11 } + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '11' - name: Assemble APK and Bundle run: | diff --git a/app/build.gradle b/app/build.gradle index 8309b1ef..2e0b9e61 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,13 +9,14 @@ plugins { android { compileSdkVersion 33 buildToolsVersion '33.0.0' + namespace 'com.rtbishop.look4sat' defaultConfig { applicationId "com.rtbishop.look4sat" minSdk 21 targetSdk 33 - versionCode 311 - versionName '3.1.1' + versionCode 312 + versionName '3.1.2' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/base/src/main/java/com/rtbishop/look4sat/utility/Extensions.kt b/base/src/main/java/com/rtbishop/look4sat/utility/Extensions.kt index ff107572..35e1b22a 100644 --- a/base/src/main/java/com/rtbishop/look4sat/utility/Extensions.kt +++ b/base/src/main/java/com/rtbishop/look4sat/utility/Extensions.kt @@ -19,11 +19,7 @@ package com.rtbishop.look4sat.utility import com.rtbishop.look4sat.domain.predict.DEG2RAD import com.rtbishop.look4sat.domain.predict.RAD2DEG -import java.net.InetSocketAddress -import java.net.Socket -import java.security.MessageDigest import java.util.concurrent.TimeUnit -import java.util.regex.Pattern fun Long.toTimerString(): String { val format = "%02d:%02d:%02d" @@ -43,23 +39,23 @@ fun Double.toDegrees(): Double = this * RAD2DEG fun Double.toRadians(): Double = this * DEG2RAD -fun String.getHash(type: String = "SHA-256"): String { - val hexChars = "0123456789ABCDEF" - val bytes = MessageDigest.getInstance(type).digest(this.toByteArray()) - val result = StringBuilder(bytes.size * 2) - bytes.forEach { - val i = it.toInt() - result.append(hexChars[i shr 4 and 0x0f]) - result.append(hexChars[i and 0x0f]) - } - return result.toString() -} +//fun String.getHash(type: String = "SHA-256"): String { +// val hexChars = "0123456789ABCDEF" +// val bytes = MessageDigest.getInstance(type).digest(this.toByteArray()) +// val result = StringBuilder(bytes.size * 2) +// bytes.forEach { +// val i = it.toInt() +// result.append(hexChars[i shr 4 and 0x0f]) +// result.append(hexChars[i and 0x0f]) +// } +// return result.toString() +//} -fun String.isValidEmail(): Boolean { - val expression = "^[\\w.-]+@([\\w\\-]+\\.)+[A-Z]{2,8}$" - val pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE) - return pattern.matcher(this).matches() -} +//fun String.isValidEmail(): Boolean { +// val expression = "^[\\w.-]+@([\\w\\-]+\\.)+[A-Z]{2,8}$" +// val pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE) +// return pattern.matcher(this).matches() +//} fun String.isValidIPv4(): Boolean { val ip4 = "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.(?!\$)|\$)){4}\$" @@ -71,16 +67,16 @@ fun String.isValidPort(): Boolean { return this.matches(port.toRegex()) && this.toInt() in 1024..65535 } -fun ping(hostname: String, port: Int): Int { - val start = System.currentTimeMillis() - val socket = Socket() - try { - socket.connect(InetSocketAddress(hostname, port), 5000) - socket.close() - } catch (exception: Exception) { - exception.printStackTrace() - println("Failed to ping: $hostname") - return Int.MAX_VALUE - } - return (System.currentTimeMillis() - start).toInt() -} +//fun ping(hostname: String, port: Int): Int { +// val start = System.currentTimeMillis() +// val socket = Socket() +// try { +// socket.connect(InetSocketAddress(hostname, port), 5000) +// socket.close() +// } catch (exception: Exception) { +// exception.printStackTrace() +// println("Failed to ping: $hostname") +// return Int.MAX_VALUE +// } +// return (System.currentTimeMillis() - start).toInt() +//} diff --git a/base/src/main/java/com/rtbishop/look4sat/utility/QthConverter.kt b/base/src/main/java/com/rtbishop/look4sat/utility/QthConverter.kt index 12bcb946..6c1782c9 100644 --- a/base/src/main/java/com/rtbishop/look4sat/utility/QthConverter.kt +++ b/base/src/main/java/com/rtbishop/look4sat/utility/QthConverter.kt @@ -55,7 +55,7 @@ object QthConverter { return (lat >= -90.0 && lat <= 90.0) && (lon >= -180.0 && lon <= 360.0) } - fun isValidLocator(locator: String): Boolean { + private fun isValidLocator(locator: String): Boolean { return locator.matches("[a-xA-X][a-xA-X][0-9][0-9][a-xA-X][a-xA-X]".toRegex()) } } diff --git a/build.gradle b/build.gradle index 197ac2d7..0f209868 100644 --- a/build.gradle +++ b/build.gradle @@ -1,28 +1,28 @@ buildscript { ext { - hilt_version = '2.43.2' + hilt_version = '2.44' safe_args_version = '2.4.1' - application_version = '7.2.2' + application_version = '7.3.1' library_version = '7.1.2' kotlin_android_version = '1.6.10' - core_ktx_version = '1.8.0' + core_ktx_version = '1.9.0' core_splashscreen_version = '1.0.0' constraint_version = '2.1.4' lifecycle_version = '2.5.1' - navigation_version = '2.5.1' + navigation_version = '2.5.2' work_version = '2.7.1' room_version = '2.4.3' material_version = '1.6.1' osmdroid_version = '6.1.14' - json_version = '20220320' + json_version = '20220924' compose_version = '1.2.1' activity_compose_version = '1.4.0' material_adapter_version = '1.1.10' - fragment_test_version = '1.5.2' + fragment_test_version = '1.5.3' leakcanary_version = '2.9.1' junit_version = '4.13.2' - mockito_version = '4.7.0' - robolectric_version = '4.8.2' + mockito_version = '4.8.1' + robolectric_version = '4.9' coroutines_test_version = '1.6.4' androidx_test_version = '1.4.0' androidx_junit_version = '1.1.3' diff --git a/fastlane/metadata/android/en-US/changelogs/312.txt b/fastlane/metadata/android/en-US/changelogs/312.txt new file mode 100644 index 00000000..ff4e149c --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/312.txt @@ -0,0 +1,5 @@ +Switched to targeting Android 13, API v33 +Added automatic TLE update functionality +Added recent TLE update time information +Added passes recalculation on TLE update +Enabled APK build minification with R8 \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/whatsnew/whatsnew-en-US b/fastlane/metadata/android/en-US/whatsnew/whatsnew-en-US index bbbe9677..ff4e149c 100644 --- a/fastlane/metadata/android/en-US/whatsnew/whatsnew-en-US +++ b/fastlane/metadata/android/en-US/whatsnew/whatsnew-en-US @@ -1,5 +1,5 @@ -Re-enabled the rotator control switch (fix) -Increased radar sweep rotation speed -Fixed negative lat/lon manual input bug -Added R4UAB TLE source and category -Updated libraries and dependencies \ No newline at end of file +Switched to targeting Android 13, API v33 +Added automatic TLE update functionality +Added recent TLE update time information +Added passes recalculation on TLE update +Enabled APK build minification with R8 \ No newline at end of file