mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
v3.1.2 - Android 13, auto update, R8 minification
This commit is contained in:
1 parent
baf61ca9bc
commit
b156f666ef
7 files changed
+56
-52
No files matched your search
@@ -10,11 +10,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout latest commit
|
- name: Checkout latest commit
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup java environment
|
- name: Setup java environment
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v3
|
||||||
with: { java-version: 11 }
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
|
||||||
- name: Assemble APK and Bundle
|
- name: Assemble APK and Bundle
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+3
-2
@@ -9,13 +9,14 @@ plugins {
|
|||||||
android {
|
android {
|
||||||
compileSdkVersion 33
|
compileSdkVersion 33
|
||||||
buildToolsVersion '33.0.0'
|
buildToolsVersion '33.0.0'
|
||||||
|
namespace 'com.rtbishop.look4sat'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.rtbishop.look4sat"
|
applicationId "com.rtbishop.look4sat"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 311
|
versionCode 312
|
||||||
versionName '3.1.1'
|
versionName '3.1.2'
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,7 @@ package com.rtbishop.look4sat.utility
|
|||||||
|
|
||||||
import com.rtbishop.look4sat.domain.predict.DEG2RAD
|
import com.rtbishop.look4sat.domain.predict.DEG2RAD
|
||||||
import com.rtbishop.look4sat.domain.predict.RAD2DEG
|
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.concurrent.TimeUnit
|
||||||
import java.util.regex.Pattern
|
|
||||||
|
|
||||||
fun Long.toTimerString(): String {
|
fun Long.toTimerString(): String {
|
||||||
val format = "%02d:%02d:%02d"
|
val format = "%02d:%02d:%02d"
|
||||||
@@ -43,23 +39,23 @@ fun Double.toDegrees(): Double = this * RAD2DEG
|
|||||||
|
|
||||||
fun Double.toRadians(): Double = this * DEG2RAD
|
fun Double.toRadians(): Double = this * DEG2RAD
|
||||||
|
|
||||||
fun String.getHash(type: String = "SHA-256"): String {
|
//fun String.getHash(type: String = "SHA-256"): String {
|
||||||
val hexChars = "0123456789ABCDEF"
|
// val hexChars = "0123456789ABCDEF"
|
||||||
val bytes = MessageDigest.getInstance(type).digest(this.toByteArray())
|
// val bytes = MessageDigest.getInstance(type).digest(this.toByteArray())
|
||||||
val result = StringBuilder(bytes.size * 2)
|
// val result = StringBuilder(bytes.size * 2)
|
||||||
bytes.forEach {
|
// bytes.forEach {
|
||||||
val i = it.toInt()
|
// val i = it.toInt()
|
||||||
result.append(hexChars[i shr 4 and 0x0f])
|
// result.append(hexChars[i shr 4 and 0x0f])
|
||||||
result.append(hexChars[i and 0x0f])
|
// result.append(hexChars[i and 0x0f])
|
||||||
}
|
// }
|
||||||
return result.toString()
|
// return result.toString()
|
||||||
}
|
//}
|
||||||
|
|
||||||
fun String.isValidEmail(): Boolean {
|
//fun String.isValidEmail(): Boolean {
|
||||||
val expression = "^[\\w.-]+@([\\w\\-]+\\.)+[A-Z]{2,8}$"
|
// val expression = "^[\\w.-]+@([\\w\\-]+\\.)+[A-Z]{2,8}$"
|
||||||
val pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE)
|
// val pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE)
|
||||||
return pattern.matcher(this).matches()
|
// return pattern.matcher(this).matches()
|
||||||
}
|
//}
|
||||||
|
|
||||||
fun String.isValidIPv4(): Boolean {
|
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}\$"
|
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
|
return this.matches(port.toRegex()) && this.toInt() in 1024..65535
|
||||||
}
|
}
|
||||||
|
|
||||||
fun ping(hostname: String, port: Int): Int {
|
//fun ping(hostname: String, port: Int): Int {
|
||||||
val start = System.currentTimeMillis()
|
// val start = System.currentTimeMillis()
|
||||||
val socket = Socket()
|
// val socket = Socket()
|
||||||
try {
|
// try {
|
||||||
socket.connect(InetSocketAddress(hostname, port), 5000)
|
// socket.connect(InetSocketAddress(hostname, port), 5000)
|
||||||
socket.close()
|
// socket.close()
|
||||||
} catch (exception: Exception) {
|
// } catch (exception: Exception) {
|
||||||
exception.printStackTrace()
|
// exception.printStackTrace()
|
||||||
println("Failed to ping: $hostname")
|
// println("Failed to ping: $hostname")
|
||||||
return Int.MAX_VALUE
|
// return Int.MAX_VALUE
|
||||||
}
|
// }
|
||||||
return (System.currentTimeMillis() - start).toInt()
|
// return (System.currentTimeMillis() - start).toInt()
|
||||||
}
|
//}
|
||||||
@@ -55,7 +55,7 @@ object QthConverter {
|
|||||||
return (lat >= -90.0 && lat <= 90.0) && (lon >= -180.0 && lon <= 360.0)
|
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())
|
return locator.matches("[a-xA-X][a-xA-X][0-9][0-9][a-xA-X][a-xA-X]".toRegex())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+8
-8
@@ -1,28 +1,28 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
hilt_version = '2.43.2'
|
hilt_version = '2.44'
|
||||||
safe_args_version = '2.4.1'
|
safe_args_version = '2.4.1'
|
||||||
application_version = '7.2.2'
|
application_version = '7.3.1'
|
||||||
library_version = '7.1.2'
|
library_version = '7.1.2'
|
||||||
kotlin_android_version = '1.6.10'
|
kotlin_android_version = '1.6.10'
|
||||||
core_ktx_version = '1.8.0'
|
core_ktx_version = '1.9.0'
|
||||||
core_splashscreen_version = '1.0.0'
|
core_splashscreen_version = '1.0.0'
|
||||||
constraint_version = '2.1.4'
|
constraint_version = '2.1.4'
|
||||||
lifecycle_version = '2.5.1'
|
lifecycle_version = '2.5.1'
|
||||||
navigation_version = '2.5.1'
|
navigation_version = '2.5.2'
|
||||||
work_version = '2.7.1'
|
work_version = '2.7.1'
|
||||||
room_version = '2.4.3'
|
room_version = '2.4.3'
|
||||||
material_version = '1.6.1'
|
material_version = '1.6.1'
|
||||||
osmdroid_version = '6.1.14'
|
osmdroid_version = '6.1.14'
|
||||||
json_version = '20220320'
|
json_version = '20220924'
|
||||||
compose_version = '1.2.1'
|
compose_version = '1.2.1'
|
||||||
activity_compose_version = '1.4.0'
|
activity_compose_version = '1.4.0'
|
||||||
material_adapter_version = '1.1.10'
|
material_adapter_version = '1.1.10'
|
||||||
fragment_test_version = '1.5.2'
|
fragment_test_version = '1.5.3'
|
||||||
leakcanary_version = '2.9.1'
|
leakcanary_version = '2.9.1'
|
||||||
junit_version = '4.13.2'
|
junit_version = '4.13.2'
|
||||||
mockito_version = '4.7.0'
|
mockito_version = '4.8.1'
|
||||||
robolectric_version = '4.8.2'
|
robolectric_version = '4.9'
|
||||||
coroutines_test_version = '1.6.4'
|
coroutines_test_version = '1.6.4'
|
||||||
androidx_test_version = '1.4.0'
|
androidx_test_version = '1.4.0'
|
||||||
androidx_junit_version = '1.1.3'
|
androidx_junit_version = '1.1.3'
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
Re-enabled the rotator control switch (fix)
|
Switched to targeting Android 13, API v33
|
||||||
Increased radar sweep rotation speed
|
Added automatic TLE update functionality
|
||||||
Fixed negative lat/lon manual input bug
|
Added recent TLE update time information
|
||||||
Added R4UAB TLE source and category
|
Added passes recalculation on TLE update
|
||||||
Updated libraries and dependencies
|
Enabled APK build minification with R8
|
||||||
Reference in new issue
Block a user