Skip to content

Commit 2744a8b

Browse files
AntsyLichjobobby04
authored andcommitted
Address some deprecations
(cherry picked from commit d53a382)
1 parent 0ab7d18 commit 2744a8b

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

app/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ android {
100100
}
101101
create("dev") {
102102
// Include pseudolocales: https://developer.android.com/guide/topics/resources/pseudolocales
103-
resourceConfigurations.addAll(listOf("en", "en_XA", "ar_XB", "xxhdpi"))
103+
androidResources {
104+
@Suppress("UnstableApiUsage")
105+
localeFilters += listOf("en", "en_XA", "ar_XB", "xxhdpi")
106+
}
104107
dimension = "default"
105108
}
106109
}

app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class ExtensionInstallActivity : Activity() {
2525
override fun onCreate(savedInstanceState: Bundle?) {
2626
super.onCreate(savedInstanceState)
2727

28+
@Suppress("DEPRECATION")
2829
val installIntent = Intent(Intent.ACTION_INSTALL_PACKAGE)
2930
.setDataAndType(intent.data, intent.type)
3031
.putExtra(Intent.EXTRA_RETURN_RESULT, true)

app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,10 @@ class ReaderActivity : BaseActivity() {
663663
SurfaceColors.SURFACE_2.getColor(this),
664664
if (isNightMode()) 230 else 242, // 90% dark 95% light
665665
)
666+
@Suppress("DEPRECATION")
666667
window.statusBarColor = toolbarColor
667668
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
669+
@Suppress("DEPRECATION")
668670
window.navigationBarColor = toolbarColor
669671
}
670672

buildSrc/src/main/kotlin/mihon/buildlogic/Commands.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package mihon.buildlogic
22

33
import org.gradle.api.Project
4-
import java.io.ByteArrayOutputStream
54
import java.time.LocalDateTime
65
import java.time.ZoneOffset
76
import java.time.format.DateTimeFormatter
@@ -26,10 +25,11 @@ fun Project.getBuildTime(): String {
2625
}
2726

2827
private fun Project.runCommand(command: String): String {
29-
val byteOut = ByteArrayOutputStream()
30-
exec {
28+
return providers.exec {
3129
commandLine = command.split(" ")
32-
standardOutput = byteOut
3330
}
34-
return String(byteOut.toByteArray()).trim()
31+
.standardOutput
32+
.asText
33+
.get()
34+
.trim()
3535
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ android.nonTransitiveRClass=false
22
android.useAndroidX=true
33

44
kotlin.code.style=official
5-
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
65
kotlin.mpp.androidSourceSetLayoutVersion=2
76

87
org.gradle.caching=true

0 commit comments

Comments
 (0)