Skip to content

Commit

Permalink
Address some deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
AntsyLich committed Jan 21, 2025
1 parent c283abe commit d53a382
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
5 changes: 4 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ android {
}
create("dev") {
// Include pseudolocales: https://developer.android.com/guide/topics/resources/pseudolocales
resourceConfigurations.addAll(listOf("en", "en_XA", "ar_XB", "xxhdpi"))
androidResources {
@Suppress("UnstableApiUsage")
localeFilters += listOf("en", "en_XA", "ar_XB", "xxhdpi")
}
dimension = "default"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ExtensionInstallActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

@Suppress("DEPRECATION")
val installIntent = Intent(Intent.ACTION_INSTALL_PACKAGE)
.setDataAndType(intent.data, intent.type)
.putExtra(Intent.EXTRA_RETURN_RESULT, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,10 @@ class ReaderActivity : BaseActivity() {
SurfaceColors.SURFACE_2.getColor(this),
if (isNightMode()) 230 else 242, // 90% dark 95% light
)
@Suppress("DEPRECATION")
window.statusBarColor = toolbarColor
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
@Suppress("DEPRECATION")
window.navigationBarColor = toolbarColor
}

Expand Down
10 changes: 5 additions & 5 deletions buildSrc/src/main/kotlin/mihon/buildlogic/Commands.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package mihon.buildlogic

import org.gradle.api.Project
import java.io.ByteArrayOutputStream
import java.time.LocalDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
Expand All @@ -26,10 +25,11 @@ fun Project.getBuildTime(): String {
}

private fun Project.runCommand(command: String): String {
val byteOut = ByteArrayOutputStream()
exec {
return providers.exec {
commandLine = command.split(" ")
standardOutput = byteOut
}
return String(byteOut.toByteArray()).trim()
.standardOutput
.asText
.get()
.trim()
}
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ android.nonTransitiveRClass=false
android.useAndroidX=true

kotlin.code.style=official
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
kotlin.mpp.androidSourceSetLayoutVersion=2

org.gradle.caching=true
Expand Down

0 comments on commit d53a382

Please sign in to comment.