Skip to content

Commit

Permalink
Generate libraries json manually
Browse files Browse the repository at this point in the history
  • Loading branch information
fibelatti committed Oct 6, 2024
1 parent ed3da9b commit f8db896
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ room {

aboutLibraries {
excludeFields = arrayOf("generated")
registerAndroidTasks = false
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import com.fibelatti.pinboard.R
import com.fibelatti.pinboard.core.android.composable.AppTheme
import com.mikepenz.aboutlibraries.Libs
import com.mikepenz.aboutlibraries.ui.compose.LibrariesContainer
import com.mikepenz.aboutlibraries.ui.compose.LibraryDefaults
import com.mikepenz.aboutlibraries.util.withJson
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
Expand All @@ -38,6 +40,9 @@ class OssLicensesActivity : AppCompatActivity() {
private fun OssLicensesScreen() {
LibrariesContainer(
modifier = Modifier.fillMaxSize(),
librariesBlock = { ctx ->
Libs.Builder().withJson(ctx, R.raw.aboutlibraries).build()
},
colors = LibraryDefaults.libraryColors(
backgroundColor = MaterialTheme.colorScheme.background,
contentColor = MaterialTheme.colorScheme.onBackground,
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/raw/aboutlibraries.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions update-libraries-json.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /usr/bin/env bash

set -e

./gradlew app:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/res/raw/ -PaboutLibraries.exportVariant=release

0 comments on commit f8db896

Please sign in to comment.