Use new toml file for version declaration

This commit is contained in:
tzugen 2021-12-20 21:25:51 +01:00
parent dd92d00be5
commit 1eca5a756e
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
14 changed files with 379 additions and 816 deletions

View File

@ -13,11 +13,11 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath gradlePlugins.gradle
classpath gradlePlugins.kotlin
classpath gradlePlugins.ktlintGradle
classpath gradlePlugins.detekt
classpath gradlePlugins.jacoco
classpath libs.gradle
classpath libs.kotlin
classpath libs.ktlintGradle
classpath libs.detekt
classpath libs.jacoco
}
}
@ -47,6 +47,6 @@ allprojects {
apply from: 'gradle_scripts/jacoco.gradle'
wrapper {
gradleVersion(versions.gradle)
gradleVersion(libs.versions.gradle.get())
distributionType("all")
}

View File

@ -8,7 +8,7 @@ ext {
}
dependencies {
implementation androidSupport.roomRuntime
implementation androidSupport.roomKtx
kapt androidSupport.room
implementation libs.roomRuntime
implementation libs.roomKtx
kapt libs.room
}

View File

@ -1,24 +1,24 @@
apply from: bootstrap.kotlinModule
dependencies {
api other.retrofit
api other.jacksonConverter
api other.koinCore
api libs.retrofit
api libs.jacksonConverter
api libs.koinCore
implementation(other.jacksonKotlin) {
implementation(libs.jacksonKotlin) {
exclude module: 'kotlin-reflect'
}
implementation other.kotlinReflect // for jackson kotlin, but to use the same version
implementation other.okhttpLogging
implementation other.timber
implementation libs.kotlinReflect // for jackson kotlin, but to use the same version
implementation libs.okhttpLogging
implementation libs.timber
testImplementation testing.kotlinJunit
testImplementation testing.mockito
testImplementation testing.mockitoInline
testImplementation testing.mockitoKotlin
testImplementation testing.kluent
testImplementation testing.mockWebServer
testImplementation testing.apacheCodecs
testImplementation libs.kotlinJunit
testImplementation libs.mockito
testImplementation libs.mockitoInline
testImplementation libs.mockitoKotlin
testImplementation libs.kluent
testImplementation libs.mockWebServer
testImplementation libs.apacheCodecs
}
ext {

View File

@ -83,7 +83,7 @@ class SubsonicAPIClient(
// Create the Retrofit instance, and register a special converter factory
// It will update our protocol version to the correct version, once we made a successful call
val retrofit: Retrofit = Retrofit.Builder()
private val retrofit: Retrofit = Retrofit.Builder()
.baseUrl("${config.baseUrl}/rest/")
.client(okHttpClient)
.addConverterFactory(
@ -113,10 +113,13 @@ class SubsonicAPIClient(
this.addInterceptor(loggingInterceptor)
}
@SuppressWarnings("TrustAllX509TrustManager", "EmptyFunctionBlock")
private fun OkHttpClient.Builder.allowSelfSignedCertificates() {
val trustManager = object : X509TrustManager {
val trustManager =
@Suppress("CustomX509TrustManager")
object : X509TrustManager {
@Suppress("TrustAllX509TrustManager")
override fun checkClientTrusted(p0: Array<out X509Certificate>?, p1: String?) {}
@Suppress("TrustAllX509TrustManager")
override fun checkServerTrusted(p0: Array<out X509Certificate>?, p1: String?) {}
override fun getAcceptedIssuers(): Array<X509Certificate> = emptyArray()
}

View File

@ -2,109 +2,4 @@ ext.versions = [
minSdk : 21,
targetSdk : 30,
compileSdk : 31,
// You need to run ./gradlew wrapper after updating the version
gradle : '7.3.2',
navigation : "2.3.5",
gradlePlugin : "7.0.0",
androidxcore : "1.6.0",
ktlint : "0.43.2",
ktlintGradle : "10.2.0",
detekt : "1.19.0",
jacoco : "0.8.7",
preferences : "1.1.1",
media : "1.3.1",
androidSupport : "28.0.0",
androidLegacySupport : "1.0.0",
androidSupportDesign : "1.4.0",
constraintLayout : "2.1.1",
multidex : "2.0.1",
room : "2.4.0",
kotlin : "1.6.10",
kotlinxCoroutines : "1.5.2-native-mt",
viewModelKtx : "2.3.0",
retrofit : "2.9.0",
jackson : "2.9.5",
okhttp : "3.14.19",
koin : "3.0.2",
picasso : "2.71828",
junit4 : "4.13.2",
junit5 : "5.8.1",
mockito : "4.1.0",
mockitoKotlin : "4.0.0",
kluent : "1.68",
apacheCodecs : "1.15",
robolectric : "4.6.1",
timber : "4.7.1",
fastScroll : "2.0.1",
colorPicker : "2.2.3",
rxJava : "3.1.2",
rxAndroid : "3.0.0",
multiType : "4.3.0",
]
ext.gradlePlugins = [
gradle : "com.android.tools.build:gradle:$versions.gradlePlugin",
kotlin : "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin",
ktlintGradle : "org.jlleitschuh.gradle:ktlint-gradle:$versions.ktlintGradle",
detekt : "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$versions.detekt",
jacoco : "org.jacoco:org.jacoco.core:$versions.jacoco",
]
ext.androidSupport = [
core : "androidx.core:core-ktx:$versions.androidxcore",
support : "androidx.legacy:legacy-support-v4:$versions.androidLegacySupport",
design : "com.google.android.material:material:$versions.androidSupportDesign",
annotations : "com.android.support:support-annotations:$versions.androidSupport",
multidex : "androidx.multidex:multidex:$versions.multidex",
constraintLayout : "androidx.constraintlayout:constraintlayout:$versions.constraintLayout",
room : "androidx.room:room-compiler:$versions.room",
roomRuntime : "androidx.room:room-runtime:$versions.room",
roomKtx : "androidx.room:room-ktx:$versions.room",
viewModelKtx : "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.viewModelKtx",
navigationFragment : "androidx.navigation:navigation-fragment:$versions.navigation",
navigationUi : "androidx.navigation:navigation-ui:$versions.navigation",
navigationFragmentKtx : "androidx.navigation:navigation-fragment-ktx:$versions.navigation",
navigationUiKtx : "androidx.navigation:navigation-ui-ktx:$versions.navigation",
navigationFeature : "androidx.navigation:navigation-dynamic-features-fragment:$versions.navigation",
preferences : "androidx.preference:preference:$versions.preferences",
media : "androidx.media:media:$versions.media",
]
ext.other = [
kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin",
kotlinReflect : "org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin",
kotlinxCoroutines : "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.kotlinxCoroutines",
retrofit : "com.squareup.retrofit2:retrofit:$versions.retrofit",
gsonConverter : "com.squareup.retrofit2:converter-gson:$versions.retrofit",
jacksonConverter : "com.squareup.retrofit2:converter-jackson:$versions.retrofit",
jacksonKotlin : "com.fasterxml.jackson.module:jackson-module-kotlin:$versions.jackson",
okhttpLogging : "com.squareup.okhttp3:logging-interceptor:$versions.okhttp",
koinCore : "io.insert-koin:koin-core:$versions.koin",
koinAndroid : "io.insert-koin:koin-android:$versions.koin",
koinViewModel : "io.insert-koin:koin-android-viewmodel:$versions.koin",
picasso : "com.squareup.picasso:picasso:$versions.picasso",
timber : "com.jakewharton.timber:timber:$versions.timber",
fastScroll : "com.simplecityapps:recyclerview-fastscroll:$versions.fastScroll",
colorPickerView : "com.github.skydoves:colorpickerview:$versions.colorPicker",
rxJava : "io.reactivex.rxjava3:rxjava:$versions.rxJava",
rxAndroid : "io.reactivex.rxjava3:rxandroid:$versions.rxAndroid",
multiType : "com.drakeet.multitype:multitype:$versions.multiType",
]
ext.testing = [
junit : "junit:junit:$versions.junit4",
junitVintage : "org.junit.vintage:junit-vintage-engine:$versions.junit5",
kotlinJunit : "org.jetbrains.kotlin:kotlin-test-junit:$versions.kotlin",
mockitoKotlin : "org.mockito.kotlin:mockito-kotlin:$versions.mockitoKotlin",
mockito : "org.mockito:mockito-core:$versions.mockito",
mockitoInline : "org.mockito:mockito-inline:$versions.mockito",
kluent : "org.amshove.kluent:kluent:$versions.kluent",
kluentAndroid : "org.amshove.kluent:kluent-android:$versions.kluent",
mockWebServer : "com.squareup.okhttp3:mockwebserver:$versions.okhttp",
apacheCodecs : "commons-codec:commons-codec:$versions.apacheCodecs",
robolectric : "org.robolectric:robolectric:$versions.robolectric"
]

100
gradle/libs.versions.toml Normal file
View File

@ -0,0 +1,100 @@
[versions]
# You need to run ./gradlew wrapper after updating the version
gradle = "7.3.2"
navigation = "2.3.5"
gradlePlugin = "7.0.4"
androidxcore = "1.6.0"
ktlint = "0.43.2"
ktlintGradle = "10.2.0"
detekt = "1.19.0"
jacoco = "0.8.7"
preferences = "1.1.1"
media = "1.3.1"
androidSupport = "28.0.0"
androidLegacySupport = "1.0.0"
androidSupportDesign = "1.4.0"
constraintLayout = "2.1.1"
multidex = "2.0.1"
room = "2.4.0"
kotlin = "1.6.10"
kotlinxCoroutines = "1.5.2-native-mt"
viewModelKtx = "2.3.0"
retrofit = "2.6.4"
jackson = "2.9.5"
okhttp = "3.12.13"
koin = "3.0.2"
picasso = "2.71828"
junit4 = "4.13.2"
junit5 = "5.8.1"
mockito = "4.1.0"
mockitoKotlin = "4.0.0"
kluent = "1.68"
apacheCodecs = "1.15"
robolectric = "4.6.1"
timber = "4.7.1"
fastScroll = "2.0.1"
colorPicker = "2.2.3"
rxJava = "3.1.2"
rxAndroid = "3.0.0"
multiType = "4.3.0"
[libraries]
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin" }
kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
ktlintGradle = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref = "ktlintGradle" }
detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
jacoco = { module = "org.jacoco:org.jacoco.core", version.ref = "jacoco" }
core = { module = "androidx.core:core-ktx", version.ref = "androidxcore" }
support = { module = "androidx.legacy:legacy-support-v4", version.ref = "androidLegacySupport" }
design = { module = "com.google.android.material:material", version.ref = "androidSupportDesign" }
annotations = { module = "com.android.support:support-annotations", version.ref = "androidSupport" }
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
constraintLayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintLayout" }
room = { module = "androidx.room:room-compiler", version.ref = "room" }
roomRuntime = { module = "androidx.room:room-runtime", version.ref = "room" }
roomKtx = { module = "androidx.room:room-ktx", version.ref = "room" }
viewModelKtx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "viewModelKtx" }
navigationFragment = { module = "androidx.navigation:navigation-fragment", version.ref = "navigation" }
navigationUi = { module = "androidx.navigation:navigation-ui", version.ref = "navigation" }
navigationFragmentKtx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation" }
navigationUiKtx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation" }
navigationFeature = { module = "androidx.navigation:navigation-dynamic-features-fragment", version.ref = "navigation" }
preferences = { module = "androidx.preference:preference", version.ref = "preferences" }
media = { module = "androidx.media:media", version.ref = "media" }
kotlinStdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlinxCoroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
gsonConverter = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
jacksonConverter = { module = "com.squareup.retrofit2:converter-jackson", version.ref = "retrofit" }
jacksonKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
okhttpLogging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
koinCore = { module = "io.insert-koin:koin-core", version.ref = "koin" }
koinAndroid = { module = "io.insert-koin:koin-android", version.ref = "koin" }
koinViewModel = { module = "io.insert-koin:koin-android-viewmodel", version.ref = "koin" }
picasso = { module = "com.squareup.picasso:picasso", version.ref = "picasso" }
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }
fastScroll = { module = "com.simplecityapps:recyclerview-fastscroll", version.ref = "fastScroll" }
colorPickerView = { module = "com.github.skydoves:colorpickerview", version.ref = "colorPicker" }
rxJava = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxJava" }
rxAndroid = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxAndroid" }
multiType = { module = "com.drakeet.multitype:multitype", version.ref = "multiType" }
junit = { module = "junit:junit", version.ref = "junit4" }
junitVintage = { module = "org.junit.vintage:junit-vintage-engine", version.ref = "junit5" }
kotlinJunit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
mockitoKotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin" }
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockitoInline = { module = "org.mockito:mockito-inline", version.ref = "mockito" }
kluent = { module = "org.amshove.kluent:kluent", version.ref = "kluent" }
kluentAndroid = { module = "org.amshove.kluent:kluent-android", version.ref = "kluent" }
mockWebServer = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
apacheCodecs = { module = "commons-codec:commons-codec", version.ref = "apacheCodecs" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }

View File

@ -53,14 +53,14 @@ tasks.withType(Test) {
}
dependencies {
api other.kotlinStdlib
api libs.kotlinStdlib
testImplementation testing.junit
testRuntimeOnly testing.junitVintage
testImplementation libs.junit
testRuntimeOnly libs.junitVintage
}
jacoco {
toolVersion(versions.jacoco)
toolVersion(libs.versions.jacoco.get())
}
ext {

View File

@ -6,7 +6,7 @@ if (isCodeQualityEnabled) {
apply plugin: "org.jlleitschuh.gradle.ktlint"
ktlint {
version = versions.ktlint
version = libs.versions.ktlint.get()
outputToConsole = true
android = true
}
@ -21,7 +21,7 @@ if (isCodeQualityEnabled) {
detekt {
buildUponDefaultConfig = true
toolVersion = versions.detekt
toolVersion = libs.versions.detekt.get()
// Builds the AST in parallel. Rules are always executed in parallel.
// Can lead to speedups in larger projects.
parallel = true

View File

@ -1,7 +1,7 @@
apply plugin: 'jacoco'
jacoco {
toolVersion(versions.jacoco)
toolVersion(libs.versions.jacoco.get())
}
def mergedJacocoExec = file("${project.buildDir}/jacoco/jacocoMerged.exec")

View File

@ -15,14 +15,14 @@ sourceSets {
dependencies {
api other.kotlinStdlib
api libs.kotlinStdlib
testImplementation testing.junit
testRuntimeOnly testing.junitVintage
testImplementation libs.junit
testRuntimeOnly libs.junitVintage
}
jacoco {
toolVersion(versions.jacoco)
toolVersion(libs.versions.jacoco.get())
}
ext {

View File

@ -1,3 +1,5 @@
enableFeaturePreview("VERSION_CATALOGS")
include ':core:domain'
include ':core:subsonic-api'
include ':ultrasonic'

View File

@ -78,54 +78,54 @@ dependencies {
implementation project(':core:domain')
implementation project(':core:subsonic-api')
api(other.picasso) {
api(libs.picasso) {
exclude group: "com.android.support"
}
implementation androidSupport.core
implementation androidSupport.support
implementation androidSupport.design
implementation androidSupport.multidex
implementation androidSupport.roomRuntime
implementation androidSupport.roomKtx
implementation androidSupport.viewModelKtx
implementation androidSupport.constraintLayout
implementation androidSupport.preferences
implementation androidSupport.media
implementation libs.core
implementation libs.support
implementation libs.design
implementation libs.multidex
implementation libs.roomRuntime
implementation libs.roomKtx
implementation libs.viewModelKtx
implementation libs.constraintLayout
implementation libs.preferences
implementation libs.media
implementation androidSupport.navigationFragment
implementation androidSupport.navigationUi
implementation androidSupport.navigationFragmentKtx
implementation androidSupport.navigationUiKtx
implementation androidSupport.navigationFeature
implementation libs.navigationFragment
implementation libs.navigationUi
implementation libs.navigationFragmentKtx
implementation libs.navigationUiKtx
implementation libs.navigationFeature
implementation other.kotlinStdlib
implementation other.kotlinxCoroutines
implementation other.koinAndroid
implementation other.okhttpLogging
implementation other.fastScroll
implementation other.colorPickerView
implementation other.rxJava
implementation other.rxAndroid
implementation other.multiType
implementation libs.kotlinStdlib
implementation libs.kotlinxCoroutines
implementation libs.koinAndroid
implementation libs.okhttpLogging
implementation libs.fastScroll
implementation libs.colorPickerView
implementation libs.rxJava
implementation libs.rxAndroid
implementation libs.multiType
kapt androidSupport.room
kapt libs.room
testImplementation other.kotlinReflect
testImplementation testing.junit
testRuntimeOnly testing.junitVintage
testImplementation testing.kotlinJunit
testImplementation testing.kluent
testImplementation testing.mockito
testImplementation testing.mockitoInline
testImplementation testing.mockitoKotlin
testImplementation testing.robolectric
testImplementation libs.kotlinReflect
testImplementation libs.junit
testRuntimeOnly libs.junitVintage
testImplementation libs.kotlinJunit
testImplementation libs.kluent
testImplementation libs.mockito
testImplementation libs.mockitoInline
testImplementation libs.mockitoKotlin
testImplementation libs.robolectric
implementation other.timber
implementation libs.timber
}
jacoco {
toolVersion(versions.jacoco)
toolVersion(libs.versions.jacoco.get())
}
// Excluding all java classes and stuff that should not be covered
@ -149,7 +149,7 @@ ext {
}
jacoco {
toolVersion(versions.jacoco)
toolVersion(libs.versions.jacoco.get())
}
tasks.withType(Test) {

View File

@ -1,19 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 4.2.2" client="gradle" variant="release" version="4.2.2">
<issue
id="ObsoleteLintCustomCheck"
message="Lint found an issue registry (`androidx.appcompat.AppCompatIssueRegistry`) which is older than the current API level; these checks may not work correctly.&#xA;&#xA;Recompile the checks against the latest version. Custom check API version is 7 (4.0), current lint API level is 8 (4.1)">
<location
file="../../../../.gradle/caches/transforms-3/cfd0dffad81bb5ff9173a2c6d47f5e0a/transformed/appcompat-1.2.0/jars/lint.jar"/>
</issue>
<issue
id="ObsoleteLintCustomCheck"
message="Lint found an issue registry (`timber.lint.TimberIssueRegistry`) which is older than the current API level; these checks may not work correctly.&#xA;&#xA;Recompile the checks against the latest version. Custom check API version is 1 (3.1), current lint API level is 8 (4.1)">
<location
file="../../../../.gradle/caches/transforms-3/9362f92689454001c7932b460b41bbdb/transformed/jetified-timber-4.7.1/jars/lint.jar"/>
</issue>
<issues format="6" by="lint 7.0.4" type="baseline" client="gradle" name="AGP (7.0.4)" variant="all" version="7.0.4">
<issue
id="InflateParams"
@ -81,6 +67,20 @@
column="9"/>
</issue>
<issue
id="TrustAllX509TrustManager"
message="`checkClientTrusted` is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers">
<location
file="org/moire/ultrasonic/api/subsonic/SubsonicAPIClient$allowSelfSignedCertificates$trustManager$1.class"/>
</issue>
<issue
id="TrustAllX509TrustManager"
message="`checkServerTrusted` is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers">
<location
file="org/moire/ultrasonic/api/subsonic/SubsonicAPIClient$allowSelfSignedCertificates$trustManager$1.class"/>
</issue>
<issue
id="ExportedContentProvider"
message="Exported content providers can provide access to potentially sensitive data"
@ -103,6 +103,182 @@
column="10"/>
</issue>
<issue
id="IntentFilterExportedReceiver"
message="As of Android 12, `android:exported` must be set; use `true` to make the activity \&#xA;available to other apps, and `false` otherwise. For launcher activities, this should be set to `true`."
errorLine1=" &lt;activity android:name=&quot;.activity.NavigationActivity&quot;"
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="41"
column="10"/>
</issue>
<issue
id="IntentFilterExportedReceiver"
message="As of Android 12, `android:exported` must be set; use `true` to make the activity \&#xA;available to other apps, and `false` otherwise."
errorLine1=" &lt;receiver android:name=&quot;.receiver.MediaButtonIntentReceiver&quot;>"
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="76"
column="10"/>
</issue>
<issue
id="IntentFilterExportedReceiver"
message="As of Android 12, `android:exported` must be set; use `true` to make the activity \&#xA;available to other apps, and `false` otherwise."
errorLine1=" &lt;receiver android:name=&quot;.receiver.UltrasonicIntentReceiver&quot;>"
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="81"
column="10"/>
</issue>
<issue
id="IntentFilterExportedReceiver"
message="As of Android 12, `android:exported` must be set; use `true` to make the activity \&#xA;available to other apps, and `false` otherwise."
errorLine1=" &lt;receiver android:name=&quot;.receiver.BluetoothIntentReceiver&quot;>"
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="93"
column="10"/>
</issue>
<issue
id="IntentFilterExportedReceiver"
message="As of Android 12, `android:exported` must be set; use `true` to make the activity \&#xA;available to other apps, and `false` otherwise."
errorLine1=" &lt;receiver"
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="101"
column="10"/>
</issue>
<issue
id="IntentFilterExportedReceiver"
message="As of Android 12, `android:exported` must be set; use `true` to make the activity \&#xA;available to other apps, and `false` otherwise."
errorLine1=" &lt;receiver"
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="112"
column="10"/>
</issue>
<issue
id="IntentFilterExportedReceiver"
message="As of Android 12, `android:exported` must be set; use `true` to make the activity \&#xA;available to other apps, and `false` otherwise."
errorLine1=" &lt;receiver"
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="123"
column="10"/>
</issue>
<issue
id="IntentFilterExportedReceiver"
message="As of Android 12, `android:exported` must be set; use `true` to make the activity \&#xA;available to other apps, and `false` otherwise."
errorLine1=" &lt;receiver"
errorLine2=" ~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="134"
column="10"/>
</issue>
<issue
id="UnspecifiedImmutableFlag"
message="Missing `PendingIntent` mutability flag"
errorLine1=" return PendingIntent.getActivity(this, 0, intent, flags)"
errorLine2=" ~~~~~">
<location
file="src/main/kotlin/org/moire/ultrasonic/service/MediaPlayerService.kt"
line="708"
column="59"/>
</issue>
<issue
id="UnspecifiedImmutableFlag"
message="Missing `PendingIntent` mutability flag"
errorLine1=" PendingIntent.FLAG_CANCEL_CURRENT"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/kotlin/org/moire/ultrasonic/util/MediaSessionHandler.kt"
line="323"
column="13"/>
</issue>
<issue
id="UnspecifiedImmutableFlag"
message="Missing `PendingIntent` mutability flag"
errorLine1=" PendingIntent pendingIntent = PendingIntent.getActivity(context, 10, intent, PendingIntent.FLAG_UPDATE_CURRENT);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/org/moire/ultrasonic/provider/UltrasonicAppWidgetProvider.java"
line="198"
column="80"/>
</issue>
<issue
id="UnspecifiedImmutableFlag"
message="Missing `PendingIntent` mutability flag"
errorLine1=" pendingIntent = PendingIntent.getBroadcast(context, 11, intent, 0);"
errorLine2=" ~">
<location
file="src/main/java/org/moire/ultrasonic/provider/UltrasonicAppWidgetProvider.java"
line="206"
column="67"/>
</issue>
<issue
id="UnspecifiedImmutableFlag"
message="Missing `PendingIntent` mutability flag"
errorLine1=" pendingIntent = PendingIntent.getBroadcast(context, 12, intent, 0);"
errorLine2=" ~">
<location
file="src/main/java/org/moire/ultrasonic/provider/UltrasonicAppWidgetProvider.java"
line="212"
column="67"/>
</issue>
<issue
id="UnspecifiedImmutableFlag"
message="Missing `PendingIntent` mutability flag"
errorLine1=" pendingIntent = PendingIntent.getBroadcast(context, 13, intent, 0);"
errorLine2=" ~">
<location
file="src/main/java/org/moire/ultrasonic/provider/UltrasonicAppWidgetProvider.java"
line="218"
column="67"/>
</issue>
<issue
id="UnspecifiedImmutableFlag"
message="Missing `PendingIntent` mutability flag"
errorLine1=" return PendingIntent.getBroadcast(context, requestCode, intent, flags)"
errorLine2=" ~~~~~">
<location
file="src/main/kotlin/org/moire/ultrasonic/util/Util.kt"
line="891"
column="73"/>
</issue>
<issue
id="NotifyDataSetChanged"
message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort."
errorLine1=" viewAdapter.notifyDataSetChanged()"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/kotlin/org/moire/ultrasonic/fragment/PlayerFragment.kt"
line="908"
column="21"/>
</issue>
<issue
id="ObsoleteLayoutParam"
message="Invalid layout param in a `LinearLayout`: `layout_above`"
@ -200,54 +376,6 @@
file="src/main/res/values/strings.xml"
line="114"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="98"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="97"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="111"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="108"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="108"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="95"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="111"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="97"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="97"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="108"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="108"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="107"
column="13"/>
</issue>
<issue
@ -259,54 +387,6 @@
file="src/main/res/values/strings.xml"
line="128"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="109"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="108"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="124"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="121"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="119"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="106"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="124"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="108"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="108"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="121"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="121"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="120"
column="13"/>
</issue>
<issue
@ -318,54 +398,6 @@
file="src/main/res/values/strings.xml"
line="133"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="114"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="113"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="129"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="126"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="124"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="110"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="129"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="112"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="112"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="126"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="126"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="125"
column="13"/>
</issue>
<issue
@ -377,54 +409,6 @@
file="src/main/res/values/strings.xml"
line="134"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="115"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="114"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="130"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="127"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="125"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="111"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="130"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="113"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="113"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="127"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="127"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="126"
column="13"/>
</issue>
<issue
@ -436,54 +420,6 @@
file="src/main/res/values/strings.xml"
line="135"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="116"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="115"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="131"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="128"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="126"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="112"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="131"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="114"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="114"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="128"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="128"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="127"
column="13"/>
</issue>
<issue
@ -495,54 +431,6 @@
file="src/main/res/values/strings.xml"
line="136"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="117"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="116"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="132"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="129"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="127"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="113"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="132"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="115"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="115"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="129"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="129"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="128"
column="13"/>
</issue>
<issue
@ -554,54 +442,6 @@
file="src/main/res/values/strings.xml"
line="141"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="122"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="121"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="137"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="134"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="132"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="118"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="137"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="120"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="120"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="134"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="134"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="133"
column="13"/>
</issue>
<issue
@ -613,54 +453,6 @@
file="src/main/res/values/strings.xml"
line="147"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="128"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="127"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="143"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="140"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="138"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="124"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="143"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="126"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="126"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="140"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="140"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="139"
column="13"/>
</issue>
<issue
@ -672,54 +464,6 @@
file="src/main/res/values/strings.xml"
line="159"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="140"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="139"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="155"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="152"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="150"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="136"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="155"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="138"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="138"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="152"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="152"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="151"
column="13"/>
</issue>
<issue
@ -753,54 +497,6 @@
file="src/main/res/values/strings.xml"
line="230"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="208"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="207"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="223"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="220"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="218"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="203"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="223"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="206"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="206"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="220"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="220"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="217"
column="13"/>
</issue>
<issue
@ -812,54 +508,6 @@
file="src/main/res/values/strings.xml"
line="299"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="273"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="272"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="292"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="287"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="285"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="266"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="292"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="271"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="271"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="289"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="287"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="285"
column="13"/>
</issue>
<issue
@ -871,54 +519,6 @@
file="src/main/res/values/strings.xml"
line="302"
column="13"/>
<location
file="src/main/res/values-cs/strings.xml"
line="276"
column="13"/>
<location
file="src/main/res/values-de/strings.xml"
line="275"
column="13"/>
<location
file="src/main/res/values-es/strings.xml"
line="295"
column="13"/>
<location
file="src/main/res/values-fr/strings.xml"
line="290"
column="13"/>
<location
file="src/main/res/values-hu/strings.xml"
line="288"
column="13"/>
<location
file="src/main/res/values-it/strings.xml"
line="269"
column="13"/>
<location
file="src/main/res/values-nl/strings.xml"
line="295"
column="13"/>
<location
file="src/main/res/values-pl/strings.xml"
line="274"
column="13"/>
<location
file="src/main/res/values-pt/strings.xml"
line="274"
column="13"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="292"
column="13"/>
<location
file="src/main/res/values-ru/strings.xml"
line="290"
column="13"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="288"
column="13"/>
</issue>
<issue
@ -941,46 +541,6 @@
file="src/main/res/values/strings.xml"
line="447"
column="14"/>
<location
file="src/main/res/values-cs/strings.xml"
line="413"
column="14"/>
<location
file="src/main/res/values-es/strings.xml"
line="436"
column="14"/>
<location
file="src/main/res/values-fr/strings.xml"
line="425"
column="14"/>
<location
file="src/main/res/values-hu/strings.xml"
line="420"
column="14"/>
<location
file="src/main/res/values-nl/strings.xml"
line="436"
column="14"/>
<location
file="src/main/res/values-pl/strings.xml"
line="388"
column="14"/>
<location
file="src/main/res/values-pt/strings.xml"
line="375"
column="14"/>
<location
file="src/main/res/values-pt-rBR/strings.xml"
line="429"
column="14"/>
<location
file="src/main/res/values-ru/strings.xml"
line="437"
column="14"/>
<location
file="src/main/res/values-zh-rCN/strings.xml"
line="419"
column="14"/>
</issue>
<issue

View File

@ -26,6 +26,8 @@
*/
package org.moire.ultrasonic.service.ssl;
import android.annotation.SuppressLint;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
@ -34,6 +36,7 @@ import javax.net.ssl.X509TrustManager;
/**
* @since 4.1
*/
@SuppressLint("CustomX509TrustManager")
class TrustManagerDecorator implements X509TrustManager
{