Updated gradle wrapper and cleaned up files

This commit is contained in:
Arty Bishop committed 2025-12-27 15:01:45 +00:00
1 parent 3580854479
commit 1719f8cc2e
7 files changed
+46 -130

No files matched your search

+7 -42
View File
@@ -9,17 +9,16 @@ plugins {
android { android {
namespace = "com.rtbishop.look4sat" namespace = "com.rtbishop.look4sat"
compileSdk = 33 compileSdk = 33
defaultConfig { defaultConfig {
applicationId = "com.rtbishop.look4sat" applicationId = "com.rtbishop.look4sat"
minSdk = 21 minSdk = 21
targetSdk = 33 targetSdk = 33
versionCode = 313 versionCode = 313
versionName = "3.1.3" versionName = "3.1.3"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
buildFeatures { buildFeatures {
buildConfig = true
compose = true compose = true
} }
buildTypes { buildTypes {
@@ -33,53 +32,19 @@ android {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17
} }
kotlinOptions { composeOptions { kotlinCompilerExtensionVersion = "1.4.7" }
jvmTarget = JavaVersion.VERSION_17.toString() packaging { resources { excludes += listOf("META-INF/{AL2.0,LGPL2.1}") } }
}
testOptions {
unitTests {
all { it.useJUnitPlatform() }
isIncludeAndroidResources = true
isReturnDefaultValues = true
}
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.7"
}
packaging {
resources {
excludes += listOf(
"/META-INF/{AL2.0,LGPL2.1}",
"META-INF/DEPENDENCIES.txt",
"META-INF/LICENSE.txt",
"META-INF/NOTICE.txt",
"META-INF/NOTICE",
"META-INF/LICENSE",
"META-INF/DEPENDENCIES",
"META-INF/notice.txt",
"META-INF/license.txt",
"META-INF/dependencies.txt",
"META-INF/LGPL2.1",
"META-INF/maven/commons-io/commons-io/pom.xml",
"META-INF/maven/commons-io/commons-io/pom.properties"
)
}
}
}
kotlin {
jvmToolchain(17)
} }
dependencies { dependencies {
implementation(project(":data")) implementation(project(":data"))
implementation(project(":domain")) implementation(project(":domain"))
// Android
implementation("androidx.core:core-splashscreen:1.0.1") implementation("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.room:room-runtime:2.5.2") implementation("androidx.room:room-runtime:2.5.2")
implementation("androidx.room:room-ktx:2.5.2") implementation("androidx.room:room-ktx:2.5.2")
ksp("androidx.room:room-compiler:2.5.2") ksp("androidx.room:room-compiler:2.5.2")
// Compose
implementation("androidx.activity:activity-compose:1.7.2") implementation("androidx.activity:activity-compose:1.7.2")
implementation("androidx.compose.animation:animation:1.4.3") implementation("androidx.compose.animation:animation:1.4.3")
implementation("androidx.compose.compiler:compiler:1.5.1") implementation("androidx.compose.compiler:compiler:1.5.1")
@@ -88,13 +53,13 @@ dependencies {
implementation("androidx.compose.ui:ui-tooling-preview:1.4.3") implementation("androidx.compose.ui:ui-tooling-preview:1.4.3")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1") implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1")
implementation("androidx.navigation:navigation-compose:2.6.0") implementation("androidx.navigation:navigation-compose:2.6.0")
// Utility
implementation("com.squareup.okhttp3:okhttp:4.10.0") implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation("org.osmdroid:osmdroid-android:6.1.16") implementation("org.osmdroid:osmdroid-android:6.1.16")
debugImplementation("androidx.compose.ui:ui-tooling:1.4.3") debugImplementation("androidx.compose.ui:ui-tooling:1.4.3")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.4.3") debugImplementation("androidx.compose.ui:ui-test-manifest:1.4.3")
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.12") debugImplementation("com.squareup.leakcanary:leakcanary-android:2.12")
// Test
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
testImplementation("io.mockk:mockk:1.13.5") testImplementation("io.mockk:mockk:1.13.5")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
+14 -11
View File
@@ -1,11 +1,14 @@
# Please add these rules to your existing keep rules in order to suppress warnings. # JSR 305 annotations are for embedding nullability information.
# This is generated automatically by the Android Gradle plugin. -dontwarn javax.annotation.**
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket # A resource is loaded with a relative path so the package of this class must be preserved.
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider -adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz
-dontwarn org.conscrypt.Conscrypt$Version
-dontwarn org.conscrypt.Conscrypt # Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.conscrypt.ConscryptHostnameVerifier -dontwarn org.codehaus.mojo.animal_sniffer.*
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket # OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
-dontwarn org.openjsse.net.ssl.OpenJSSE -dontwarn okhttp3.internal.platform.**
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**
+3 -26
View File
@@ -9,50 +9,27 @@ plugins {
android { android {
namespace = "com.rtbishop.look4sat.data" namespace = "com.rtbishop.look4sat.data"
compileSdk = 33 compileSdk = 33
defaultConfig { defaultConfig {
minSdk = 21 minSdk = 21
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17
} }
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
testOptions {
unitTests {
all { it.useJUnitPlatform() }
isIncludeAndroidResources = true
isReturnDefaultValues = true
}
}
}
kotlin {
jvmToolchain(17)
} }
dependencies { dependencies {
implementation(project(":domain")) implementation(project(":domain"))
// Android
implementation("androidx.core:core-ktx:1.10.1") implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.room:room-runtime:2.5.2") implementation("androidx.room:room-runtime:2.5.2")
implementation("androidx.room:room-ktx:2.5.2") implementation("androidx.room:room-ktx:2.5.2")
ksp("androidx.room:room-compiler:2.5.2") ksp("androidx.room:room-compiler:2.5.2")
// Utility
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("com.squareup.okhttp3:okhttp:4.10.0") implementation("com.squareup.okhttp3:okhttp:4.10.0")
// Test
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
testImplementation("io.mockk:mockk:1.13.5") testImplementation("io.mockk:mockk:1.13.5")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
@@ -31,7 +31,6 @@ class DataParserTest {
private val validCSVStream = """ private val validCSVStream = """
OBJECT_NAME,OBJECT_ID,EPOCH,MEAN_MOTION,ECCENTRICITY,INCLINATION,RA_OF_ASC_NODE,ARG_OF_PERICENTER,MEAN_ANOMALY,EPHEMERIS_TYPE,CLASSIFICATION_TYPE,NORAD_CAT_ID,ELEMENT_SET_NO,REV_AT_EPOCH,BSTAR,MEAN_MOTION_DOT,MEAN_MOTION_DDOT OBJECT_NAME,OBJECT_ID,EPOCH,MEAN_MOTION,ECCENTRICITY,INCLINATION,RA_OF_ASC_NODE,ARG_OF_PERICENTER,MEAN_ANOMALY,EPHEMERIS_TYPE,CLASSIFICATION_TYPE,NORAD_CAT_ID,ELEMENT_SET_NO,REV_AT_EPOCH,BSTAR,MEAN_MOTION_DOT,MEAN_MOTION_DDOT
ISS (ZARYA),1998-067A,2021-11-16T12:28:09.322176,15.48582035,.0004694,51.6447,309.4881,203.6966,299.8876,0,U,25544,999,31220,.31985E-4,.1288E-4,0 ISS (ZARYA),1998-067A,2021-11-16T12:28:09.322176,15.48582035,.0004694,51.6447,309.4881,203.6966,299.8876,0,U,25544,999,31220,.31985E-4,.1288E-4,0
ISS (ZARYA),1998-067A,2024-03-09T05:45:04.737024,15.49756209,.0005741,51.6418,90.7424,343.9724,92.8274,0,U,25544,999,44305,.25016E-3,.1373E-3,0
FLTSATCOM 8 (USA 46),1989-077A,2022-01-07T11:37:38.074080,1.00273350,.0001114,12.9044,1.3272,91.5769,260.4200,0,U,20253,999,24434,0,-.85E-6,0 FLTSATCOM 8 (USA 46),1989-077A,2022-01-07T11:37:38.074080,1.00273350,.0001114,12.9044,1.3272,91.5769,260.4200,0,U,20253,999,24434,0,-.85E-6,0
""".trimIndent().byteInputStream() """.trimIndent().byteInputStream()
private val invalidCSVStream = """ private val invalidCSVStream = """
@@ -42,9 +41,6 @@ class DataParserTest {
ISS (ZARYA) ISS (ZARYA)
1 25544U 98067A 21320.51955234 .00001288 00000+0 31985-4 0 9990 1 25544U 98067A 21320.51955234 .00001288 00000+0 31985-4 0 9990
2 25544 51.6447 309.4881 0004694 203.6966 299.8876 15.48582035312205 2 25544 51.6447 309.4881 0004694 203.6966 299.8876 15.48582035312205
ISS (ZARYA)
1 25544U 98067A 24069.23963816 .00013730 00000+0 25016-3 0 9999
2 25544 51.6418 90.7424 0005741 343.9724 92.8274 15.49756209443058
FLTSATCOM 8 (USA 46) FLTSATCOM 8 (USA 46)
1 20253U 89077A 22007.48446845 -.00000085 00000+0 00000+0 0 9999 1 20253U 89077A 22007.48446845 -.00000085 00000+0 00000+0 0 9999
2 20253 12.9044 1.3272 0001114 91.5769 260.4200 1.00273350244345 2 20253 12.9044 1.3272 0001114 91.5769 260.4200 1.00273350244345
@@ -53,18 +49,17 @@ class DataParserTest {
1 25544U 98067A 21320.51955234 .00001288 00000+0 31985-4 0 9990 1 25544U 98067A 21320.51955234 .00001288 00000+0 31985-4 0 9990
2 25544 51.6447 309.4881 0004694 203.6966 299.8876 15.48582035312205 2 25544 51.6447 309.4881 0004694 203.6966 299.8876 15.48582035312205
""".trimIndent().byteInputStream() """.trimIndent().byteInputStream()
private val validJSONStream = """ // private val validJSONStream = """
[{"uuid":"UzPz4gcsNBPKPKAFPmer7g","description":"Upper side band (drifting)","alive":true,"type":"Transmitter","uplink_low":null,"uplink_high":null,"uplink_drift":null,"downlink_low":136658500,"downlink_high":null,"downlink_drift":null,"mode":"USB","mode_id":9,"uplink_mode":null,"invert":false,"baud":null,"sat_id":"SCHX-0895-2361-9925-0309","norad_cat_id":965,"status":"active","updated":"2019-04-18T05:39:53.343316Z","citation":"CITATION NEEDED - https://xkcd.com/285/","service":"Unknown","coordination":"","coordination_url":""}] // [{"uuid":"UzPz4gcsNBPKPKAFPmer7g","description":"Upper side band (drifting)","alive":true,"type":"Transmitter","uplink_low":null,"uplink_high":null,"uplink_drift":null,"downlink_low":136658500,"downlink_high":null,"downlink_drift":null,"mode":"USB","mode_id":9,"uplink_mode":null,"invert":false,"baud":null,"sat_id":"SCHX-0895-2361-9925-0309","norad_cat_id":965,"status":"active","updated":"2019-04-18T05:39:53.343316Z","citation":"CITATION NEEDED - https://xkcd.com/285/","service":"Unknown","coordination":"","coordination_url":""}]
""".trimIndent().byteInputStream() // """.trimIndent().byteInputStream()
private val invalidJSONStream = """ // private val invalidJSONStream = """
[{"description":"Upper side band (drifting)","alive":true,"type":"Transmitter","uplink_low":null,"uplink_high":null,"uplink_drift":null,"downlink_low":136658500,"downlink_high":null,"downlink_drift":null,"mode":"USB","mode_id":9,"uplink_mode":null,"invert":false,"baud":null,"sat_id":"SCHX-0895-2361-9925-0309","norad_cat_id":965,"status":"active","updated":"2019-04-18T05:39:53.343316Z","citation":"CITATION NEEDED - https://xkcd.com/285/","service":"Unknown","coordination":"","coordination_url":""}] // [{"description":"Upper side band (drifting)","alive":true,"type":"Transmitter","uplink_low":null,"uplink_high":null,"uplink_drift":null,"downlink_low":136658500,"downlink_high":null,"downlink_drift":null,"mode":"USB","mode_id":9,"uplink_mode":null,"invert":false,"baud":null,"sat_id":"SCHX-0895-2361-9925-0309","norad_cat_id":965,"status":"active","updated":"2019-04-18T05:39:53.343316Z","citation":"CITATION NEEDED - https://xkcd.com/285/","service":"Unknown","coordination":"","coordination_url":""}]
""".trimIndent().byteInputStream() // """.trimIndent().byteInputStream()
@Test @Test
fun `Given valid CSV stream returns valid data`() = runTest(testDispatcher) { fun `Given valid CSV stream returns valid data`() = runTest(testDispatcher) {
val parsedList = dataParser.parseCSVStream(validCSVStream) val parsedList = dataParser.parseCSVStream(validCSVStream)
assert(parsedList[0].epoch == 21320.51955234) assert(parsedList[0].epoch == 21320.51955234)
assert(parsedList[1].epoch == 24069.23963816)
} }
@Test @Test
@@ -77,7 +72,6 @@ class DataParserTest {
fun `Given valid TLE stream returns valid data`() = runTest(testDispatcher) { fun `Given valid TLE stream returns valid data`() = runTest(testDispatcher) {
val parsedList = dataParser.parseTLEStream(validTLEStream) val parsedList = dataParser.parseTLEStream(validTLEStream)
assert(parsedList[0].epoch == 21320.51955234) assert(parsedList[0].epoch == 21320.51955234)
assert(parsedList[1].epoch == 24069.23963816)
} }
@Test @Test
@@ -93,23 +87,15 @@ class DataParserTest {
assert(csvResult == tleResult) assert(csvResult == tleResult)
} }
@Test // @Test
fun `Given valid JSON stream returns valid data`() = runTest(testDispatcher) { // fun `Given valid JSON stream returns valid data`() = runTest(testDispatcher) {
val parsedList = dataParser.parseJSONStream(validJSONStream) // val parsedList = dataParser.parseJSONStream(validJSONStream)
assert(parsedList[0].downlink == 136658500L) // assert(parsedList[0].downlink == 136658500L)
} // }
//
@Test // @Test
fun `Given invalid JSON stream returns empty list`() = runTest(testDispatcher) { // fun `Given invalid JSON stream returns empty list`() = runTest(testDispatcher) {
val parsedList = dataParser.parseJSONStream(invalidJSONStream) // val parsedList = dataParser.parseJSONStream(invalidJSONStream)
assert(parsedList.isEmpty()) // assert(parsedList.isEmpty())
} // }
@Test
fun `Function isLeapYear returns correct data`() = runTest(testDispatcher) {
val years = listOf(1900, 1984, 1994, 2016, 2022, 2024, 2042, 2048)
val answers = listOf(false, true, false, true, false, true, false, true)
val results = years.map { dataParser.isLeapYear(it) }
assert(results == answers)
}
} }
@@ -1,16 +0,0 @@
package com.rtbishop.look4sat.data
import org.junit.Assert.assertEquals
import org.junit.Test
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
+3 -2
View File
@@ -21,14 +21,15 @@
# resources declared in the library itself and none from the library's dependencies, # resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library # thereby reducing the size of the R class for that library
#android.nonTransitiveRClass=true #android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true android.defaults.buildfeatures.buildconfig=false
android.enableJetifier=false android.enableJetifier=false
android.nonFinalResIds=false android.nonFinalResIds=true
android.nonTransitiveRClass=true android.nonTransitiveRClass=true
android.useAndroidX=true android.useAndroidX=true
kotlin.code.style=official kotlin.code.style=official
kotlin.daemon.jvm.options=-Xmx4096M kotlin.daemon.jvm.options=-Xmx4096M
kotlin.incremental=true kotlin.incremental=true
org.gradle.caching=true org.gradle.caching=true
org.gradle.configuration-cache=true
org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g
org.gradle.parallel=true org.gradle.parallel=true
+2 -2
View File
@@ -1,6 +1,6 @@
#Fri Apr 21 15:31:10 BST 2023 #Sat Jul 29 12:58:49 BST 2023
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists