--- a/sample/build.gradle.kts Tue Apr 22 19:06:50 2025 -0400
+++ b/sample/build.gradle.kts Tue Apr 22 19:36:29 2025 -0400
@@ -19,12 +19,15 @@
* You should have received a copy of the GNU General Public License
* along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
*/
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
id("com.android.application")
- id("org.jetbrains.kotlin.android")
+ kotlin("multiplatform")
id("com.geekorum.build.source-license-checker")
alias(libs.plugins.org.jetbrains.kotlin.compose.compiler)
+ alias(libs.plugins.org.jetbrains.compose.multiplatform)
alias(libs.plugins.google.gms.oss.license)
}
@@ -35,6 +38,48 @@
}
}
+kotlin {
+ androidTarget {
+ compilerOptions {
+ jvmTarget.set(JvmTarget.JVM_17)
+ }
+ }
+
+ jvm("desktop")
+
+ listOf(
+ iosX64(),
+ iosArm64(),
+ iosSimulatorArm64(),
+ ).forEach { iosTarget ->
+ iosTarget.binaries.framework {
+ baseName = "aboutoss-sample-app"
+ isStatic = true
+ }
+ }
+
+ sourceSets {
+ commonMain.dependencies {
+ implementation(project(":core"))
+ implementation(project(":ui:common"))
+ implementation(project(":ui:material2"))
+ implementation(project(":ui:material3"))
+ implementation(compose.material3)
+ implementation(compose.components.resources)
+ implementation(compose.components.uiToolingPreview)
+ }
+
+ androidMain.dependencies {
+ api(libs.androidx.activity)
+ implementation(dependencies.enforcedPlatform(libs.androidx.compose.bom))
+ implementation(libs.androidx.activity.compose)
+ implementation(libs.geekdroid)
+ implementation(libs.androidx.lifecycle.viewmodel.compose)
+ }
+ }
+}
+
+
android {
namespace = "com.geekorum.aboutoss.sampleapp"
compileSdk = 35
@@ -62,12 +107,10 @@
}
}
compileOptions {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
}
- kotlinOptions {
- jvmTarget = "1.8"
- }
+
buildFeatures {
compose = true
buildConfig = true
@@ -80,25 +123,6 @@
}
dependencies {
- implementation(project(":core"))
- implementation(project(":ui:common"))
- implementation(project(":ui:material2"))
- implementation(project(":ui:material3"))
-
- implementation(libs.geekdroid) {
- //TODO get rid of dagger platform in geekdroid
- exclude("com.google.dagger", "dagger-platform")
- }
-
-
- implementation(libs.androidx.lifecycle.viewmodel)
- implementation(libs.androidx.lifecycle.viewmodel.compose)
- implementation(libs.androidx.activity.compose)
- implementation(platform(libs.androidx.compose.bom))
- implementation(libs.androidx.compose.ui)
- implementation(libs.androidx.compose.ui.graphics)
- implementation(libs.androidx.compose.ui.tooling.preview)
- implementation(libs.androidx.compose.material3)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/AndroidManifest.xml Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ AboutOss is an utility library to retrieve and display
+ opensource licenses in Android applications.
+
+ Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+
+ This file is part of AboutOss.
+
+ AboutOss is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ AboutOss is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <application
+ android:allowBackup="true"
+ android:icon="@mipmap/ic_launcher"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_launcher_round"
+ android:supportsRtl="true"
+ android:theme="@style/Theme.AboutOss">
+ <activity
+ android:name=".MainActivity"
+ android:exported="true"
+ android:label="@string/app_name"
+ android:theme="@style/Theme.AboutOss">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name=".PrebuiltLicencesMaterial2Activity"
+ android:theme="@style/Theme.AppCompat.Light.NoActionBar"
+ android:exported="false" />
+
+ <activity android:name=".PrebuiltLicencesMaterial3Activity"
+ android:theme="@style/Theme.AppCompat.Light.NoActionBar"
+ android:exported="false" />
+
+ </application>
+
+</manifest>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/kotlin/com/geekorum/aboutoss/sampleapp/CustomViewer.kt Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,113 @@
+/*
+ * AboutOss is an utility library to retrieve and display
+ * opensource licenses in Android applications.
+ *
+ * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of AboutOss.
+ *
+ * AboutOss is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AboutOss is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.geekorum.aboutoss.sampleapp
+
+import androidx.compose.foundation.layout.*
+import androidx.compose.foundation.lazy.grid.GridCells
+import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
+import androidx.compose.foundation.lazy.grid.itemsIndexed
+import androidx.compose.material3.*
+import androidx.compose.runtime.*
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.unit.dp
+import androidx.lifecycle.viewmodel.compose.viewModel
+import com.geekorum.aboutoss.ui.common.OpenSourceLicensesViewModel
+
+@Composable
+fun CustomViewer(
+ viewModel: OpenSourceLicensesViewModel = viewModel(
+ initializer = {
+ createPrebuildOpenSourceLicensesViewModel()
+ }
+ ),
+ modifier: Modifier = Modifier
+) {
+ Column(modifier = modifier) {
+ Text("This section shows our you can use a custom ui to display licenses")
+ DependenciesGrid(viewModel, Modifier.padding(top = 16.dp))
+ }
+}
+
+@Composable
+private fun DependenciesGrid(
+ viewModel: OpenSourceLicensesViewModel,
+ modifier: Modifier = Modifier
+) {
+ val dependencies by viewModel.dependenciesList.collectAsState(initial = emptyList())
+ var selected by remember { mutableStateOf(-1) }
+ LazyVerticalGrid(
+ GridCells.Adaptive(150.dp),
+ horizontalArrangement = Arrangement.spacedBy(16.dp),
+ verticalArrangement = Arrangement.spacedBy(16.dp),
+ modifier = modifier
+ ) {
+ itemsIndexed(dependencies) { idx, dependency ->
+ if (idx == selected) {
+ val license by viewModel.getLicenseDependency(dependency)
+ .collectAsState(initial = "")
+ LicenseCard(license, onClick = {
+ selected = -1
+ })
+ } else {
+ DependencyCard(dependency, onClick = {
+ selected = idx
+ })
+ }
+ }
+ }
+}
+
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+private fun LicenseCard(license: String, onClick: () -> Unit) {
+ Card(modifier = Modifier.size(150.dp), onClick = onClick,
+ colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.primary)
+ ) {
+ Text(
+ license, style = MaterialTheme.typography.bodyMedium,
+ modifier = Modifier
+ .padding(16.dp)
+ .fillMaxSize()
+ .wrapContentSize(
+ Alignment.Center
+ )
+ )
+ }
+}
+
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+private fun DependencyCard(dependency: String, onClick: () -> Unit) {
+ Card(modifier = Modifier.size(150.dp), onClick = onClick) {
+ Text(
+ dependency,
+ style = MaterialTheme.typography.titleLarge,
+ modifier = Modifier
+ .padding(16.dp)
+ .fillMaxSize()
+ .wrapContentSize(
+ Alignment.Center
+ )
+ )
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/kotlin/com/geekorum/aboutoss/sampleapp/MainActivity.kt Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,154 @@
+/*
+ * AboutOss is an utility library to retrieve and display
+ * opensource licenses in Android applications.
+ *
+ * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of AboutOss.
+ *
+ * AboutOss is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AboutOss is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.geekorum.aboutoss.sampleapp
+
+import android.content.Intent
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.compose.foundation.layout.*
+import androidx.compose.material3.*
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.unit.dp
+import com.geekorum.aboutoss.sampleapp.ui.theme.AboutOssTheme
+import com.geekorum.aboutoss.sampleapp.ui.theme.OpenSourceLicenseTheme
+import com.geekorum.aboutoss.ui.material3.OpenSourceLicensesActivity
+import org.jetbrains.compose.ui.tooling.preview.Preview
+import com.geekorum.aboutoss.ui.material.OpenSourceLicensesActivity as Material2OpenSourceLicensesActivity
+
+class MainActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContent {
+ AboutOssTheme {
+ Sample(
+ onMaterial2Click = {
+ startMaterial2LicenseActivity()
+ },
+ onMaterial3Click = {
+ startMaterial3LicenseActivity()
+ }
+ )
+ }
+ }
+ }
+
+ private fun startMaterial2LicenseActivity() {
+ val intent = if (BuildConfig.DEBUG) {
+ // we launch a custom activity in debug to display some fake licenses
+ // see Material2AcPrebuiltLicencesMaterial2Activitytivity for more info
+ Intent(this, PrebuiltLicencesMaterial2Activity::class.java)
+ } else {
+ Intent(this, Material2OpenSourceLicensesActivity::class.java)
+ }
+ startActivity(intent)
+ }
+
+ private fun startMaterial3LicenseActivity() {
+ // Don't use default MaterialTheme but supply our own
+ OpenSourceLicensesActivity.themeProvider = { content ->
+ OpenSourceLicenseTheme(content)
+ }
+ val intent = if (BuildConfig.DEBUG) {
+ // we launch a custom activity in debug to display some fake licenses
+ // see PrebuiltLicencesMaterial3Activity for more info
+ Intent(this, PrebuiltLicencesMaterial3Activity::class.java)
+ } else {
+ Intent(this, OpenSourceLicensesActivity::class.java)
+ }
+ startActivity(intent)
+ }
+}
+
+@Composable
+private fun Sample(
+ onMaterial2Click: () -> Unit,
+ onMaterial3Click: () -> Unit,
+) {
+ Surface(
+ modifier = Modifier.fillMaxSize(),
+ color = MaterialTheme.colorScheme.background
+ ) {
+ Column(Modifier.fillMaxSize()) {
+ LaunchActivitySection(onMaterial2Click, onMaterial3Click)
+ CustomViewer(modifier = Modifier.padding(horizontal = 16.dp))
+ }
+ }
+}
+
+@Composable
+private fun LaunchActivitySection(
+ onMaterial2Click: () -> Unit,
+ onMaterial3Click: () -> Unit,
+ modifier: Modifier = Modifier
+) {
+ Column(modifier.padding(16.dp)) {
+ Text("This section launch a new activity to display licences information")
+ Row(
+ horizontalArrangement = Arrangement.SpaceAround, modifier = Modifier
+ .fillMaxWidth()
+ .padding(32.dp)
+ ) {
+ Material2Card(onClick = onMaterial2Click)
+ Material3Card(onClick = onMaterial3Click)
+ }
+ }
+}
+
+
+@Composable
+@OptIn(ExperimentalMaterial3Api::class)
+private fun Material2Card(
+ onClick: () -> Unit,
+ modifier: Modifier = Modifier
+) {
+ Card(modifier = modifier, onClick = onClick) {
+ Column(Modifier.padding(16.dp)) {
+ Text("Material2 UI", style = MaterialTheme.typography.labelLarge)
+ }
+ }
+}
+
+@Composable
+@OptIn(ExperimentalMaterial3Api::class)
+private fun Material3Card(
+ onClick: () -> Unit,
+ modifier: Modifier = Modifier
+) {
+ Card(modifier = modifier, onClick = onClick) {
+ Column(Modifier.padding(16.dp)) {
+ Text("Material3 UI", style = MaterialTheme.typography.labelLarge)
+ }
+ }
+}
+
+
+@Preview
+@Composable
+fun LauncherActivitySectionPreview() {
+ AboutOssTheme {
+ Surface {
+ LaunchActivitySection(onMaterial2Click = {}, onMaterial3Click = {})
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/kotlin/com/geekorum/aboutoss/sampleapp/PrebuiltLicencesActivities.kt Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,89 @@
+/*
+ * AboutOss is an utility library to retrieve and display
+ * opensource licenses in Android applications.
+ *
+ * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of AboutOss.
+ *
+ * AboutOss is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AboutOss is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.geekorum.aboutoss.sampleapp
+
+import androidx.activity.viewModels
+import androidx.lifecycle.ViewModelProvider
+import androidx.lifecycle.viewmodel.CreationExtras
+import androidx.lifecycle.viewmodel.initializer
+import androidx.lifecycle.viewmodel.viewModelFactory
+import com.geekorum.aboutoss.core.gms.GmsLicenseInfoRepository
+import com.geekorum.aboutoss.ui.common.AndroidBrowserLauncher
+import com.geekorum.aboutoss.ui.common.OpenSourceLicensesViewModel
+import com.geekorum.aboutoss.ui.material3.OpenSourceLicensesActivity
+import com.geekorum.geekdroid.network.BrowserLauncher
+import kotlinx.coroutines.Dispatchers
+import com.geekorum.aboutoss.ui.material.OpenSourceLicensesActivity as Material2OpenSourceLicensesActivity
+
+/**
+ * Custom activity needed to load resources from another set of files than default generated by
+ * OSS Licenses Gradle Plugin.
+ *
+ * This is necessary because OSS License gradle plugin generates stub resources on debug builds.
+ */
+class PrebuiltLicencesMaterial2Activity : Material2OpenSourceLicensesActivity() {
+ override val viewModel: OpenSourceLicensesViewModel by viewModels(
+ factoryProducer = {
+ viewModelFactory {
+ initializer {
+ createPrebuildOpenSourceLicensesViewModel()
+ }
+ }
+ }
+ )
+}
+
+
+/**
+ * Custom activity needed to load resources from another set of files than default generated by
+ * OSS Licenses Gradle Plugin.
+ *
+ * This is necessary because OSS License gradle plugin generates stub resources on debug builds.
+ */
+class PrebuiltLicencesMaterial3Activity : OpenSourceLicensesActivity() {
+ override val viewModel: OpenSourceLicensesViewModel by viewModels(
+ factoryProducer = {
+ viewModelFactory {
+ initializer {
+ createPrebuildOpenSourceLicensesViewModel()
+ }
+ }
+ }
+ )
+}
+
+fun CreationExtras.createPrebuildOpenSourceLicensesViewModel(): OpenSourceLicensesViewModel {
+ val application =
+ this[ViewModelProvider.AndroidViewModelFactory.APPLICATION_KEY]!!
+ val licenseInfoRepository = GmsLicenseInfoRepository(
+ appContext = application,
+ mainCoroutineDispatcher = Dispatchers.Main,
+ ioCoroutineDispatcher = Dispatchers.IO,
+ thirdPartyLicensesResourceName = "prebuilt_third_party_licenses",
+ thirdPartyLicenseMetadataResourceName = "prebuilt_third_party_license_metadata"
+ )
+ val browserLauncher = BrowserLauncher(application, application.packageManager)
+ return OpenSourceLicensesViewModel(
+ licenseInfoRepository,
+ AndroidBrowserLauncher(application, browserLauncher)
+ )
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/kotlin/com/geekorum/aboutoss/sampleapp/ui/theme/Color.kt Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,32 @@
+/*
+ * AboutOss is an utility library to retrieve and display
+ * opensource licenses in Android applications.
+ *
+ * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of AboutOss.
+ *
+ * AboutOss is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AboutOss is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.geekorum.aboutoss.sampleapp.ui.theme
+
+import androidx.compose.ui.graphics.Color
+
+val Purple80 = Color(0xFFD0BCFF)
+val PurpleGrey80 = Color(0xFFCCC2DC)
+val Pink80 = Color(0xFFEFB8C8)
+
+val Purple40 = Color(0xFF6650a4)
+val PurpleGrey40 = Color(0xFF625b71)
+val Pink40 = Color(0xFF7D5260)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/kotlin/com/geekorum/aboutoss/sampleapp/ui/theme/Theme.kt Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,108 @@
+/*
+ * AboutOss is an utility library to retrieve and display
+ * opensource licenses in Android applications.
+ *
+ * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of AboutOss.
+ *
+ * AboutOss is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AboutOss is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.geekorum.aboutoss.sampleapp.ui.theme
+
+import android.app.Activity
+import android.os.Build
+import androidx.compose.foundation.isSystemInDarkTheme
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.darkColorScheme
+import androidx.compose.material3.dynamicDarkColorScheme
+import androidx.compose.material3.dynamicLightColorScheme
+import androidx.compose.material3.lightColorScheme
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.SideEffect
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.toArgb
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalView
+import androidx.core.view.WindowCompat
+
+private val DarkColorScheme = darkColorScheme(
+ primary = Purple80,
+ secondary = PurpleGrey80,
+ tertiary = Pink80
+)
+
+private val LightColorScheme = lightColorScheme(
+ primary = Purple40,
+ secondary = PurpleGrey40,
+ tertiary = Pink40
+
+ /* Other default colors to override
+ background = Color(0xFFFFFBFE),
+ surface = Color(0xFFFFFBFE),
+ onPrimary = Color.White,
+ onSecondary = Color.White,
+ onTertiary = Color.White,
+ onBackground = Color(0xFF1C1B1F),
+ onSurface = Color(0xFF1C1B1F),
+ */
+)
+
+@Composable
+fun AboutOssTheme(
+ darkTheme: Boolean = isSystemInDarkTheme(),
+ // Dynamic color is available on Android 12+
+ dynamicColor: Boolean = true,
+ content: @Composable () -> Unit
+) {
+ val colorScheme = when {
+ dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
+ val context = LocalContext.current
+ if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
+ }
+
+ darkTheme -> DarkColorScheme
+ else -> LightColorScheme
+ }
+ val view = LocalView.current
+ if (!view.isInEditMode) {
+ SideEffect {
+ val window = (view.context as Activity).window
+ window.statusBarColor = colorScheme.primary.toArgb()
+ WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
+ }
+ }
+
+ MaterialTheme(
+ colorScheme = colorScheme,
+ typography = Typography,
+ content = content
+ )
+}
+
+private val OpenSourcesLightColorScheme = lightColorScheme(
+ primary = Color.Cyan,
+ secondary = PurpleGrey40,
+ tertiary = Pink40
+)
+
+@Composable
+fun OpenSourceLicenseTheme(
+ content: @Composable () -> Unit
+) {
+ MaterialTheme(
+ colorScheme = OpenSourcesLightColorScheme,
+ content = content
+ )
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/kotlin/com/geekorum/aboutoss/sampleapp/ui/theme/Type.kt Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,55 @@
+/*
+ * AboutOss is an utility library to retrieve and display
+ * opensource licenses in Android applications.
+ *
+ * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of AboutOss.
+ *
+ * AboutOss is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AboutOss is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.geekorum.aboutoss.sampleapp.ui.theme
+
+import androidx.compose.material3.Typography
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.sp
+
+// Set of Material typography styles to start with
+val Typography = Typography(
+ bodyLarge = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Normal,
+ fontSize = 16.sp,
+ lineHeight = 24.sp,
+ letterSpacing = 0.5.sp
+ )
+ /* Other default text styles to override
+ titleLarge = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Normal,
+ fontSize = 22.sp,
+ lineHeight = 28.sp,
+ letterSpacing = 0.sp
+ ),
+ labelSmall = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Medium,
+ fontSize = 11.sp,
+ lineHeight = 16.sp,
+ letterSpacing = 0.5.sp
+ )
+ */
+)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/drawable/ic_launcher_background.xml Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ AboutOss is an utility library to retrieve and display
+ opensource licenses in Android applications.
+
+ Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+
+ This file is part of AboutOss.
+
+ AboutOss is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ AboutOss is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <path
+ android:fillColor="#3DDC84"
+ android:pathData="M0,0h108v108h-108z" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M9,0L9,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M19,0L19,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M29,0L29,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M39,0L39,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M49,0L49,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M59,0L59,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M69,0L69,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M79,0L79,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M89,0L89,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M99,0L99,108"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,9L108,9"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,19L108,19"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,29L108,29"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,39L108,39"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,49L108,49"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,59L108,59"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,69L108,69"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,79L108,79"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,89L108,89"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M0,99L108,99"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M19,29L89,29"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M19,39L89,39"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M19,49L89,49"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M19,59L89,59"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M19,69L89,69"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M19,79L89,79"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M29,19L29,89"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M39,19L39,89"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M49,19L49,89"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M59,19L59,89"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M69,19L69,89"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+ <path
+ android:fillColor="#00000000"
+ android:pathData="M79,19L79,89"
+ android:strokeWidth="0.8"
+ android:strokeColor="#33FFFFFF" />
+</vector>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/drawable/ic_launcher_foreground.xml Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,53 @@
+<!--
+
+ AboutOss is an utility library to retrieve and display
+ opensource licenses in Android applications.
+
+ Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+
+ This file is part of AboutOss.
+
+ AboutOss is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ AboutOss is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
+ <aapt:attr name="android:fillColor">
+ <gradient
+ android:endX="85.84757"
+ android:endY="92.4963"
+ android:startX="42.9492"
+ android:startY="49.59793"
+ android:type="linear">
+ <item
+ android:color="#44000000"
+ android:offset="0.0" />
+ <item
+ android:color="#00000000"
+ android:offset="1.0" />
+ </gradient>
+ </aapt:attr>
+ </path>
+ <path
+ android:fillColor="#FFFFFF"
+ android:fillType="nonZero"
+ android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
+ android:strokeWidth="1"
+ android:strokeColor="#00000000" />
+</vector>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ AboutOss is an utility library to retrieve and display
+ opensource licenses in Android applications.
+
+ Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+
+ This file is part of AboutOss.
+
+ AboutOss is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ AboutOss is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@drawable/ic_launcher_background" />
+ <foreground android:drawable="@drawable/ic_launcher_foreground" />
+ <monochrome android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ AboutOss is an utility library to retrieve and display
+ opensource licenses in Android applications.
+
+ Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+
+ This file is part of AboutOss.
+
+ AboutOss is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ AboutOss is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@drawable/ic_launcher_background" />
+ <foreground android:drawable="@drawable/ic_launcher_foreground" />
+ <monochrome android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>
\ No newline at end of file
Binary file sample/src/androidMain/res/mipmap-hdpi/ic_launcher.webp has changed
Binary file sample/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp has changed
Binary file sample/src/androidMain/res/mipmap-mdpi/ic_launcher.webp has changed
Binary file sample/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp has changed
Binary file sample/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp has changed
Binary file sample/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp has changed
Binary file sample/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp has changed
Binary file sample/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp has changed
Binary file sample/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp has changed
Binary file sample/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/raw/prebuilt_third_party_license_metadata Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,118 @@
+0:46 Material Components for Android
+0:46 Compose Navigation
+0:46 Android Navigation Runtime Kotlin Extensions
+0:46 androidx.databinding:databinding-adapters
+0:46 Kotlin Stdlib Jdk7
+0:46 Kotlin Stdlib Jdk8
+0:46 Fragment Kotlin Extensions
+0:46 Android Lifecycle ViewModel
+0:46 Android Support Library fragment
+0:46 Android Transition Support Library
+0:46 Compose Geometry
+0:46 okio
+0:46 Kotlin Stdlib
+0:46 AndroidX Autofill
+0:46 Compose Runtime
+0:46 Compose Foundation
+0:46 androidx.databinding:viewbinding
+0:46 Compose Graphics
+0:46 Compose Material Icons Core
+0:46 Compose Unit
+0:46 Android Support RecyclerView
+0:46 IntelliJ IDEA Annotations
+0:46 Android Support Library Local Broadcast Manager
+0:46 Jetpack Compose Libraries BOM
+0:46 Android Support Library Annotations
+0:46 javax.inject
+0:46 Android Support AnimatedVectorDrawable
+0:46 Android Room-Runtime
+0:46 Android Arch-Runtime
+0:46 Android App Startup Runtime
+0:46 Android Support Library Sliding Pane Layout
+0:46 Android Emoji2 Compat view helpers
+0:46 androidx.databinding:databinding-ktx
+47:47 kotlinx-coroutines-bom
+0:46 Android Support Library Document File
+0:46 Saved State
+0:46 Android Support Library Annotations
+0:46 Compose Animation Core
+0:46 okio
+0:46 Android Support Library Interpolators
+0:46 Lifecycle ViewModel Compose
+0:46 Android Navigation Fragment
+0:46 Core Kotlin Extensions
+0:46 Compose Layouts
+0:46 Android ConstraintLayout Core
+0:46 okhttp
+0:46 androidx.profileinstaller:profileinstaller
+0:46 Compose Material3 Components
+0:46 AndroidX Futures
+0:46 Android Lifecycle Service
+0:46 Android AppCompat Library
+0:46 SavedState Kotlin Extensions
+0:46 Android Emoji2 Compat
+0:46 Android Lifecycle LiveData Core
+0:46 Android Support Library loader
+0:46 Android Room-Common
+0:46 Android Support Library Drawer Layout
+0:46 Compose Material Ripple
+0:46 androidx.databinding.databinding-common
+95:41 Geekdroid
+0:46 Android Lifecycle Kotlin Extensions
+0:46 Android Arch-Common
+0:46 androidx.customview:poolingcontainer
+0:46 Android Support Library Cursor Adapter
+0:46 Activity
+0:46 Android Navigation Runtime
+0:46 Android WorkManager Runtime
+0:46 Android Support CardView v7
+0:46 Android Tracing
+0:46 Kotlin Stdlib Common
+0:46 Android Lifecycle Runtime
+0:46 error-prone annotations
+0:46 androidx.databinding:databinding-runtime
+0:46 Compose Util
+0:46 Android Support Library Custom View
+0:46 Jetpack WindowManager Library
+0:46 Android Lifecycle LiveData
+0:46 Android Navigation Common
+47:47 kotlinx-coroutines-core
+0:46 Android Support VectorDrawable
+0:46 Android Lifecycle-Common for Java 8 Language
+0:46 Compose Material3 Components
+0:46 Activity Kotlin Extensions
+0:46 VersionedParcelable
+0:46 Android Lifecycle ViewModel with SavedState
+0:46 Android Support Library collections
+0:46 Compose Saveable
+0:46 Compose UI primitives
+0:46 Android Navigation Common Kotlin Extensions
+0:46 Android Support DynamicAnimation
+0:46 LiveData Core Kotlin Extensions
+0:46 Android Support Custom Tabs
+47:47 Dagger
+0:46 Compose Animation
+0:46 Android Support Library View Pager
+0:46 Compose Material Components
+0:46 Kotlin Libraries bill-of-materials
+0:46 Android Support Library Print
+0:46 AndroidX Widget ViewPager2
+0:46 Collections Kotlin Extensions
+0:46 Android Support Library Coordinator Layout
+0:46 Android Support Library core utils
+47:47 kotlinx-coroutines-android
+0:46 Android Resources Library
+0:46 Android DB
+47:47 kotlinx-coroutines-core
+0:46 AndroidX Preference
+0:46 Android Lifecycle ViewModel Kotlin Extensions
+0:46 Android Support SQLite - Framework Implementation
+0:46 Experimental annotation
+0:46 Compose Tooling API
+0:46 Android Support Library compat
+0:46 Android Resource Inspection - Annotations
+0:46 Android Lifecycle-Common
+0:46 Android ConstraintLayout
+0:46 Android Lifecycle Process
+0:46 Activity Compose
+0:46 Compose UI Text
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/raw/prebuilt_third_party_licenses Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,3 @@
+http://www.apache.org/licenses/LICENSE-2.0.txt
+https://www.apache.org/licenses/LICENSE-2.0.txt
+https://www.gnu.org/licenses/gpl-3.0.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/values/colors.xml Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ AboutOss is an utility library to retrieve and display
+ opensource licenses in Android applications.
+
+ Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+
+ This file is part of AboutOss.
+
+ AboutOss is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ AboutOss is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<resources>
+ <color name="purple_200">#FFBB86FC</color>
+ <color name="purple_500">#FF6200EE</color>
+ <color name="purple_700">#FF3700B3</color>
+ <color name="teal_200">#FF03DAC5</color>
+ <color name="teal_700">#FF018786</color>
+ <color name="black">#FF000000</color>
+ <color name="white">#FFFFFFFF</color>
+</resources>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/values/strings.xml Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,26 @@
+<!--
+
+ AboutOss is an utility library to retrieve and display
+ opensource licenses in Android applications.
+
+ Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+
+ This file is part of AboutOss.
+
+ AboutOss is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ AboutOss is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<resources>
+ <string name="app_name">Sample app</string>
+</resources>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sample/src/androidMain/res/values/themes.xml Tue Apr 22 19:36:29 2025 -0400
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ AboutOss is an utility library to retrieve and display
+ opensource licenses in Android applications.
+
+ Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
+
+ This file is part of AboutOss.
+
+ AboutOss is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ AboutOss is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<resources>
+
+ <style name="Theme.AboutOss" parent="android:Theme.Material.Light.NoActionBar" />
+</resources>
\ No newline at end of file
--- a/sample/src/main/AndroidManifest.xml Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- AboutOss is an utility library to retrieve and display
- opensource licenses in Android applications.
-
- Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
-
- This file is part of AboutOss.
-
- AboutOss is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- AboutOss is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
-
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android">
-
- <application
- android:allowBackup="true"
- android:icon="@mipmap/ic_launcher"
- android:label="@string/app_name"
- android:roundIcon="@mipmap/ic_launcher_round"
- android:supportsRtl="true"
- android:theme="@style/Theme.AboutOss">
- <activity
- android:name=".MainActivity"
- android:exported="true"
- android:label="@string/app_name"
- android:theme="@style/Theme.AboutOss">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
-
- <activity android:name=".PrebuiltLicencesMaterial2Activity"
- android:theme="@style/Theme.AppCompat.Light.NoActionBar"
- android:exported="false" />
-
- <activity android:name=".PrebuiltLicencesMaterial3Activity"
- android:theme="@style/Theme.AppCompat.Light.NoActionBar"
- android:exported="false" />
-
- </application>
-
-</manifest>
\ No newline at end of file
--- a/sample/src/main/java/com/geekorum/aboutoss/sampleapp/CustomViewer.kt Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
- * AboutOss is an utility library to retrieve and display
- * opensource licenses in Android applications.
- *
- * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
- *
- * This file is part of AboutOss.
- *
- * AboutOss is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AboutOss is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.geekorum.aboutoss.sampleapp
-
-import androidx.compose.foundation.layout.*
-import androidx.compose.foundation.lazy.grid.GridCells
-import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
-import androidx.compose.foundation.lazy.grid.itemsIndexed
-import androidx.compose.material3.*
-import androidx.compose.runtime.*
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.unit.dp
-import androidx.lifecycle.viewmodel.compose.viewModel
-import com.geekorum.aboutoss.ui.common.OpenSourceLicensesViewModel
-
-@Composable
-fun CustomViewer(
- viewModel: OpenSourceLicensesViewModel = viewModel(
- initializer = {
- createPrebuildOpenSourceLicensesViewModel()
- }
- ),
- modifier: Modifier = Modifier
-) {
- Column(modifier = modifier) {
- Text("This section shows our you can use a custom ui to display licenses")
- DependenciesGrid(viewModel, Modifier.padding(top = 16.dp))
- }
-}
-
-@Composable
-private fun DependenciesGrid(
- viewModel: OpenSourceLicensesViewModel,
- modifier: Modifier = Modifier
-) {
- val dependencies by viewModel.dependenciesList.collectAsState(initial = emptyList())
- var selected by remember { mutableStateOf(-1) }
- LazyVerticalGrid(
- GridCells.Adaptive(150.dp),
- horizontalArrangement = Arrangement.spacedBy(16.dp),
- verticalArrangement = Arrangement.spacedBy(16.dp),
- modifier = modifier
- ) {
- itemsIndexed(dependencies) { idx, dependency ->
- if (idx == selected) {
- val license by viewModel.getLicenseDependency(dependency)
- .collectAsState(initial = "")
- LicenseCard(license, onClick = {
- selected = -1
- })
- } else {
- DependencyCard(dependency, onClick = {
- selected = idx
- })
- }
- }
- }
-}
-
-@OptIn(ExperimentalMaterial3Api::class)
-@Composable
-private fun LicenseCard(license: String, onClick: () -> Unit) {
- Card(modifier = Modifier.size(150.dp), onClick = onClick,
- colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.primary)
- ) {
- Text(
- license, style = MaterialTheme.typography.bodyMedium,
- modifier = Modifier
- .padding(16.dp)
- .fillMaxSize()
- .wrapContentSize(
- Alignment.Center
- )
- )
- }
-}
-
-@OptIn(ExperimentalMaterial3Api::class)
-@Composable
-private fun DependencyCard(dependency: String, onClick: () -> Unit) {
- Card(modifier = Modifier.size(150.dp), onClick = onClick) {
- Text(
- dependency,
- style = MaterialTheme.typography.titleLarge,
- modifier = Modifier
- .padding(16.dp)
- .fillMaxSize()
- .wrapContentSize(
- Alignment.Center
- )
- )
- }
-}
--- a/sample/src/main/java/com/geekorum/aboutoss/sampleapp/MainActivity.kt Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
- * AboutOss is an utility library to retrieve and display
- * opensource licenses in Android applications.
- *
- * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
- *
- * This file is part of AboutOss.
- *
- * AboutOss is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AboutOss is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.geekorum.aboutoss.sampleapp
-
-import android.content.Intent
-import android.os.Bundle
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.compose.foundation.layout.*
-import androidx.compose.material3.*
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.tooling.preview.Preview
-import androidx.compose.ui.unit.dp
-import com.geekorum.aboutoss.sampleapp.ui.theme.AboutOssTheme
-import com.geekorum.aboutoss.sampleapp.ui.theme.OpenSourceLicenseTheme
-import com.geekorum.aboutoss.ui.material3.OpenSourceLicensesActivity
-import com.geekorum.aboutoss.ui.material.OpenSourceLicensesActivity as Material2OpenSourceLicensesActivity
-
-class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContent {
- AboutOssTheme {
- Sample(
- onMaterial2Click = {
- startMaterial2LicenseActivity()
- },
- onMaterial3Click = {
- startMaterial3LicenseActivity()
- }
- )
- }
- }
- }
-
- private fun startMaterial2LicenseActivity() {
- val intent = if (BuildConfig.DEBUG) {
- // we launch a custom activity in debug to display some fake licenses
- // see Material2AcPrebuiltLicencesMaterial2Activitytivity for more info
- Intent(this, PrebuiltLicencesMaterial2Activity::class.java)
- } else {
- Intent(this, Material2OpenSourceLicensesActivity::class.java)
- }
- startActivity(intent)
- }
-
- private fun startMaterial3LicenseActivity() {
- // Don't use default MaterialTheme but supply our own
- OpenSourceLicensesActivity.themeProvider = { content ->
- OpenSourceLicenseTheme(content)
- }
- val intent = if (BuildConfig.DEBUG) {
- // we launch a custom activity in debug to display some fake licenses
- // see PrebuiltLicencesMaterial3Activity for more info
- Intent(this, PrebuiltLicencesMaterial3Activity::class.java)
- } else {
- Intent(this, OpenSourceLicensesActivity::class.java)
- }
- startActivity(intent)
- }
-}
-
-@Composable
-private fun Sample(
- onMaterial2Click: () -> Unit,
- onMaterial3Click: () -> Unit,
-) {
- Surface(
- modifier = Modifier.fillMaxSize(),
- color = MaterialTheme.colorScheme.background
- ) {
- Column(Modifier.fillMaxSize()) {
- LaunchActivitySection(onMaterial2Click, onMaterial3Click)
- CustomViewer(modifier = Modifier.padding(horizontal = 16.dp))
- }
- }
-}
-
-@Composable
-private fun LaunchActivitySection(
- onMaterial2Click: () -> Unit,
- onMaterial3Click: () -> Unit,
- modifier: Modifier = Modifier
-) {
- Column(modifier.padding(16.dp)) {
- Text("This section launch a new activity to display licences information")
- Row(
- horizontalArrangement = Arrangement.SpaceAround, modifier = Modifier
- .fillMaxWidth()
- .padding(32.dp)
- ) {
- Material2Card(onClick = onMaterial2Click)
- Material3Card(onClick = onMaterial3Click)
- }
- }
-}
-
-
-@Composable
-@OptIn(ExperimentalMaterial3Api::class)
-private fun Material2Card(
- onClick: () -> Unit,
- modifier: Modifier = Modifier
-) {
- Card(modifier = modifier, onClick = onClick) {
- Column(Modifier.padding(16.dp)) {
- Text("Material2 UI", style = MaterialTheme.typography.labelLarge)
- }
- }
-}
-
-@Composable
-@OptIn(ExperimentalMaterial3Api::class)
-private fun Material3Card(
- onClick: () -> Unit,
- modifier: Modifier = Modifier
-) {
- Card(modifier = modifier, onClick = onClick) {
- Column(Modifier.padding(16.dp)) {
- Text("Material3 UI", style = MaterialTheme.typography.labelLarge)
- }
- }
-}
-
-
-@Preview(showBackground = true)
-@Composable
-fun LauncherActivitySectionPreview() {
- AboutOssTheme {
- LaunchActivitySection(onMaterial2Click = {}, onMaterial3Click = {})
- }
-}
\ No newline at end of file
--- a/sample/src/main/java/com/geekorum/aboutoss/sampleapp/PrebuiltLicencesActivities.kt Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * AboutOss is an utility library to retrieve and display
- * opensource licenses in Android applications.
- *
- * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
- *
- * This file is part of AboutOss.
- *
- * AboutOss is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AboutOss is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.geekorum.aboutoss.sampleapp
-
-import androidx.activity.viewModels
-import androidx.lifecycle.ViewModelProvider
-import androidx.lifecycle.viewmodel.CreationExtras
-import androidx.lifecycle.viewmodel.initializer
-import androidx.lifecycle.viewmodel.viewModelFactory
-import com.geekorum.aboutoss.core.gms.GmsLicenseInfoRepository
-import com.geekorum.aboutoss.ui.common.OpenSourceLicensesViewModel
-import com.geekorum.aboutoss.ui.material3.OpenSourceLicensesActivity
-import com.geekorum.geekdroid.network.BrowserLauncher
-import kotlinx.coroutines.Dispatchers
-import com.geekorum.aboutoss.ui.material.OpenSourceLicensesActivity as Material2OpenSourceLicensesActivity
-
-/**
- * Custom activity needed to load resources from another set of files than default generated by
- * OSS Licenses Gradle Plugin.
- *
- * This is necessary because OSS License gradle plugin generates stub resources on debug builds.
- */
-class PrebuiltLicencesMaterial2Activity : Material2OpenSourceLicensesActivity() {
- override val viewModel: OpenSourceLicensesViewModel by viewModels(
- factoryProducer = {
- viewModelFactory {
- initializer {
- createPrebuildOpenSourceLicensesViewModel()
- }
- }
- }
- )
-}
-
-
-/**
- * Custom activity needed to load resources from another set of files than default generated by
- * OSS Licenses Gradle Plugin.
- *
- * This is necessary because OSS License gradle plugin generates stub resources on debug builds.
- */
-class PrebuiltLicencesMaterial3Activity : OpenSourceLicensesActivity() {
- override val viewModel: OpenSourceLicensesViewModel by viewModels(
- factoryProducer = {
- viewModelFactory {
- initializer {
- createPrebuildOpenSourceLicensesViewModel()
- }
- }
- }
- )
-}
-
-fun CreationExtras.createPrebuildOpenSourceLicensesViewModel(): OpenSourceLicensesViewModel {
- val application =
- this[ViewModelProvider.AndroidViewModelFactory.APPLICATION_KEY]!!
- val licenseInfoRepository = GmsLicenseInfoRepository(
- appContext = application,
- mainCoroutineDispatcher = Dispatchers.Main,
- ioCoroutineDispatcher = Dispatchers.IO,
- thirdPartyLicensesResourceName = "prebuilt_third_party_licenses",
- thirdPartyLicenseMetadataResourceName = "prebuilt_third_party_license_metadata"
- )
- val browserLauncher = BrowserLauncher(application, application.packageManager)
- return OpenSourceLicensesViewModel(
- licenseInfoRepository,
- browserLauncher
- )
-}
--- a/sample/src/main/java/com/geekorum/aboutoss/sampleapp/ui/theme/Color.kt Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * AboutOss is an utility library to retrieve and display
- * opensource licenses in Android applications.
- *
- * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
- *
- * This file is part of AboutOss.
- *
- * AboutOss is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AboutOss is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.geekorum.aboutoss.sampleapp.ui.theme
-
-import androidx.compose.ui.graphics.Color
-
-val Purple80 = Color(0xFFD0BCFF)
-val PurpleGrey80 = Color(0xFFCCC2DC)
-val Pink80 = Color(0xFFEFB8C8)
-
-val Purple40 = Color(0xFF6650a4)
-val PurpleGrey40 = Color(0xFF625b71)
-val Pink40 = Color(0xFF7D5260)
\ No newline at end of file
--- a/sample/src/main/java/com/geekorum/aboutoss/sampleapp/ui/theme/Theme.kt Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
- * AboutOss is an utility library to retrieve and display
- * opensource licenses in Android applications.
- *
- * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
- *
- * This file is part of AboutOss.
- *
- * AboutOss is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AboutOss is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.geekorum.aboutoss.sampleapp.ui.theme
-
-import android.app.Activity
-import android.os.Build
-import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.darkColorScheme
-import androidx.compose.material3.dynamicDarkColorScheme
-import androidx.compose.material3.dynamicLightColorScheme
-import androidx.compose.material3.lightColorScheme
-import androidx.compose.runtime.Composable
-import androidx.compose.runtime.SideEffect
-import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.graphics.toArgb
-import androidx.compose.ui.platform.LocalContext
-import androidx.compose.ui.platform.LocalView
-import androidx.core.view.WindowCompat
-
-private val DarkColorScheme = darkColorScheme(
- primary = Purple80,
- secondary = PurpleGrey80,
- tertiary = Pink80
-)
-
-private val LightColorScheme = lightColorScheme(
- primary = Purple40,
- secondary = PurpleGrey40,
- tertiary = Pink40
-
- /* Other default colors to override
- background = Color(0xFFFFFBFE),
- surface = Color(0xFFFFFBFE),
- onPrimary = Color.White,
- onSecondary = Color.White,
- onTertiary = Color.White,
- onBackground = Color(0xFF1C1B1F),
- onSurface = Color(0xFF1C1B1F),
- */
-)
-
-@Composable
-fun AboutOssTheme(
- darkTheme: Boolean = isSystemInDarkTheme(),
- // Dynamic color is available on Android 12+
- dynamicColor: Boolean = true,
- content: @Composable () -> Unit
-) {
- val colorScheme = when {
- dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
- val context = LocalContext.current
- if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
- }
-
- darkTheme -> DarkColorScheme
- else -> LightColorScheme
- }
- val view = LocalView.current
- if (!view.isInEditMode) {
- SideEffect {
- val window = (view.context as Activity).window
- window.statusBarColor = colorScheme.primary.toArgb()
- WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
- }
- }
-
- MaterialTheme(
- colorScheme = colorScheme,
- typography = Typography,
- content = content
- )
-}
-
-private val OpenSourcesLightColorScheme = lightColorScheme(
- primary = Color.Cyan,
- secondary = PurpleGrey40,
- tertiary = Pink40
-)
-
-@Composable
-fun OpenSourceLicenseTheme(
- content: @Composable () -> Unit
-) {
- MaterialTheme(
- colorScheme = OpenSourcesLightColorScheme,
- content = content
- )
-}
--- a/sample/src/main/java/com/geekorum/aboutoss/sampleapp/ui/theme/Type.kt Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
- * AboutOss is an utility library to retrieve and display
- * opensource licenses in Android applications.
- *
- * Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
- *
- * This file is part of AboutOss.
- *
- * AboutOss is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AboutOss is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.geekorum.aboutoss.sampleapp.ui.theme
-
-import androidx.compose.material3.Typography
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
-
-// Set of Material typography styles to start with
-val Typography = Typography(
- bodyLarge = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 16.sp,
- lineHeight = 24.sp,
- letterSpacing = 0.5.sp
- )
- /* Other default text styles to override
- titleLarge = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 22.sp,
- lineHeight = 28.sp,
- letterSpacing = 0.sp
- ),
- labelSmall = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Medium,
- fontSize = 11.sp,
- lineHeight = 16.sp,
- letterSpacing = 0.5.sp
- )
- */
-)
\ No newline at end of file
--- a/sample/src/main/res/drawable/ic_launcher_background.xml Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- AboutOss is an utility library to retrieve and display
- opensource licenses in Android applications.
-
- Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
-
- This file is part of AboutOss.
-
- AboutOss is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- AboutOss is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
-
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="108dp"
- android:height="108dp"
- android:viewportWidth="108"
- android:viewportHeight="108">
- <path
- android:fillColor="#3DDC84"
- android:pathData="M0,0h108v108h-108z" />
- <path
- android:fillColor="#00000000"
- android:pathData="M9,0L9,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M19,0L19,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M29,0L29,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M39,0L39,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M49,0L49,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M59,0L59,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M69,0L69,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M79,0L79,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M89,0L89,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M99,0L99,108"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,9L108,9"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,19L108,19"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,29L108,29"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,39L108,39"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,49L108,49"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,59L108,59"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,69L108,69"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,79L108,79"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,89L108,89"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M0,99L108,99"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M19,29L89,29"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M19,39L89,39"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M19,49L89,49"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M19,59L89,59"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M19,69L89,69"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M19,79L89,79"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M29,19L29,89"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M39,19L39,89"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M49,19L49,89"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M59,19L59,89"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M69,19L69,89"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
- <path
- android:fillColor="#00000000"
- android:pathData="M79,19L79,89"
- android:strokeWidth="0.8"
- android:strokeColor="#33FFFFFF" />
-</vector>
--- a/sample/src/main/res/drawable/ic_launcher_foreground.xml Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-<!--
-
- AboutOss is an utility library to retrieve and display
- opensource licenses in Android applications.
-
- Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
-
- This file is part of AboutOss.
-
- AboutOss is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- AboutOss is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
-
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt"
- android:width="108dp"
- android:height="108dp"
- android:viewportWidth="108"
- android:viewportHeight="108">
- <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
- <aapt:attr name="android:fillColor">
- <gradient
- android:endX="85.84757"
- android:endY="92.4963"
- android:startX="42.9492"
- android:startY="49.59793"
- android:type="linear">
- <item
- android:color="#44000000"
- android:offset="0.0" />
- <item
- android:color="#00000000"
- android:offset="1.0" />
- </gradient>
- </aapt:attr>
- </path>
- <path
- android:fillColor="#FFFFFF"
- android:fillType="nonZero"
- android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
- android:strokeWidth="1"
- android:strokeColor="#00000000" />
-</vector>
\ No newline at end of file
--- a/sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- AboutOss is an utility library to retrieve and display
- opensource licenses in Android applications.
-
- Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
-
- This file is part of AboutOss.
-
- AboutOss is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- AboutOss is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
-
--->
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
- <background android:drawable="@drawable/ic_launcher_background" />
- <foreground android:drawable="@drawable/ic_launcher_foreground" />
- <monochrome android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>
\ No newline at end of file
--- a/sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- AboutOss is an utility library to retrieve and display
- opensource licenses in Android applications.
-
- Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
-
- This file is part of AboutOss.
-
- AboutOss is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- AboutOss is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
-
--->
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
- <background android:drawable="@drawable/ic_launcher_background" />
- <foreground android:drawable="@drawable/ic_launcher_foreground" />
- <monochrome android:drawable="@drawable/ic_launcher_foreground" />
-</adaptive-icon>
\ No newline at end of file
Binary file sample/src/main/res/mipmap-hdpi/ic_launcher.webp has changed
Binary file sample/src/main/res/mipmap-hdpi/ic_launcher_round.webp has changed
Binary file sample/src/main/res/mipmap-mdpi/ic_launcher.webp has changed
Binary file sample/src/main/res/mipmap-mdpi/ic_launcher_round.webp has changed
Binary file sample/src/main/res/mipmap-xhdpi/ic_launcher.webp has changed
Binary file sample/src/main/res/mipmap-xhdpi/ic_launcher_round.webp has changed
Binary file sample/src/main/res/mipmap-xxhdpi/ic_launcher.webp has changed
Binary file sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp has changed
Binary file sample/src/main/res/mipmap-xxxhdpi/ic_launcher.webp has changed
Binary file sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp has changed
--- a/sample/src/main/res/raw/prebuilt_third_party_license_metadata Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-0:46 Material Components for Android
-0:46 Compose Navigation
-0:46 Android Navigation Runtime Kotlin Extensions
-0:46 androidx.databinding:databinding-adapters
-0:46 Kotlin Stdlib Jdk7
-0:46 Kotlin Stdlib Jdk8
-0:46 Fragment Kotlin Extensions
-0:46 Android Lifecycle ViewModel
-0:46 Android Support Library fragment
-0:46 Android Transition Support Library
-0:46 Compose Geometry
-0:46 okio
-0:46 Kotlin Stdlib
-0:46 AndroidX Autofill
-0:46 Compose Runtime
-0:46 Compose Foundation
-0:46 androidx.databinding:viewbinding
-0:46 Compose Graphics
-0:46 Compose Material Icons Core
-0:46 Compose Unit
-0:46 Android Support RecyclerView
-0:46 IntelliJ IDEA Annotations
-0:46 Android Support Library Local Broadcast Manager
-0:46 Jetpack Compose Libraries BOM
-0:46 Android Support Library Annotations
-0:46 javax.inject
-0:46 Android Support AnimatedVectorDrawable
-0:46 Android Room-Runtime
-0:46 Android Arch-Runtime
-0:46 Android App Startup Runtime
-0:46 Android Support Library Sliding Pane Layout
-0:46 Android Emoji2 Compat view helpers
-0:46 androidx.databinding:databinding-ktx
-47:47 kotlinx-coroutines-bom
-0:46 Android Support Library Document File
-0:46 Saved State
-0:46 Android Support Library Annotations
-0:46 Compose Animation Core
-0:46 okio
-0:46 Android Support Library Interpolators
-0:46 Lifecycle ViewModel Compose
-0:46 Android Navigation Fragment
-0:46 Core Kotlin Extensions
-0:46 Compose Layouts
-0:46 Android ConstraintLayout Core
-0:46 okhttp
-0:46 androidx.profileinstaller:profileinstaller
-0:46 Compose Material3 Components
-0:46 AndroidX Futures
-0:46 Android Lifecycle Service
-0:46 Android AppCompat Library
-0:46 SavedState Kotlin Extensions
-0:46 Android Emoji2 Compat
-0:46 Android Lifecycle LiveData Core
-0:46 Android Support Library loader
-0:46 Android Room-Common
-0:46 Android Support Library Drawer Layout
-0:46 Compose Material Ripple
-0:46 androidx.databinding.databinding-common
-95:41 Geekdroid
-0:46 Android Lifecycle Kotlin Extensions
-0:46 Android Arch-Common
-0:46 androidx.customview:poolingcontainer
-0:46 Android Support Library Cursor Adapter
-0:46 Activity
-0:46 Android Navigation Runtime
-0:46 Android WorkManager Runtime
-0:46 Android Support CardView v7
-0:46 Android Tracing
-0:46 Kotlin Stdlib Common
-0:46 Android Lifecycle Runtime
-0:46 error-prone annotations
-0:46 androidx.databinding:databinding-runtime
-0:46 Compose Util
-0:46 Android Support Library Custom View
-0:46 Jetpack WindowManager Library
-0:46 Android Lifecycle LiveData
-0:46 Android Navigation Common
-47:47 kotlinx-coroutines-core
-0:46 Android Support VectorDrawable
-0:46 Android Lifecycle-Common for Java 8 Language
-0:46 Compose Material3 Components
-0:46 Activity Kotlin Extensions
-0:46 VersionedParcelable
-0:46 Android Lifecycle ViewModel with SavedState
-0:46 Android Support Library collections
-0:46 Compose Saveable
-0:46 Compose UI primitives
-0:46 Android Navigation Common Kotlin Extensions
-0:46 Android Support DynamicAnimation
-0:46 LiveData Core Kotlin Extensions
-0:46 Android Support Custom Tabs
-47:47 Dagger
-0:46 Compose Animation
-0:46 Android Support Library View Pager
-0:46 Compose Material Components
-0:46 Kotlin Libraries bill-of-materials
-0:46 Android Support Library Print
-0:46 AndroidX Widget ViewPager2
-0:46 Collections Kotlin Extensions
-0:46 Android Support Library Coordinator Layout
-0:46 Android Support Library core utils
-47:47 kotlinx-coroutines-android
-0:46 Android Resources Library
-0:46 Android DB
-47:47 kotlinx-coroutines-core
-0:46 AndroidX Preference
-0:46 Android Lifecycle ViewModel Kotlin Extensions
-0:46 Android Support SQLite - Framework Implementation
-0:46 Experimental annotation
-0:46 Compose Tooling API
-0:46 Android Support Library compat
-0:46 Android Resource Inspection - Annotations
-0:46 Android Lifecycle-Common
-0:46 Android ConstraintLayout
-0:46 Android Lifecycle Process
-0:46 Activity Compose
-0:46 Compose UI Text
--- a/sample/src/main/res/raw/prebuilt_third_party_licenses Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-http://www.apache.org/licenses/LICENSE-2.0.txt
-https://www.apache.org/licenses/LICENSE-2.0.txt
-https://www.gnu.org/licenses/gpl-3.0.html
--- a/sample/src/main/res/values/colors.xml Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- AboutOss is an utility library to retrieve and display
- opensource licenses in Android applications.
-
- Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
-
- This file is part of AboutOss.
-
- AboutOss is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- AboutOss is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
-
--->
-<resources>
- <color name="purple_200">#FFBB86FC</color>
- <color name="purple_500">#FF6200EE</color>
- <color name="purple_700">#FF3700B3</color>
- <color name="teal_200">#FF03DAC5</color>
- <color name="teal_700">#FF018786</color>
- <color name="black">#FF000000</color>
- <color name="white">#FFFFFFFF</color>
-</resources>
\ No newline at end of file
--- a/sample/src/main/res/values/strings.xml Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<!--
-
- AboutOss is an utility library to retrieve and display
- opensource licenses in Android applications.
-
- Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
-
- This file is part of AboutOss.
-
- AboutOss is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- AboutOss is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
-
--->
-<resources>
- <string name="app_name">Sample app</string>
-</resources>
\ No newline at end of file
--- a/sample/src/main/res/values/themes.xml Tue Apr 22 19:06:50 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- AboutOss is an utility library to retrieve and display
- opensource licenses in Android applications.
-
- Copyright (C) 2023-2025 by Frederic-Charles Barthelery.
-
- This file is part of AboutOss.
-
- AboutOss is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- AboutOss is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with AboutOss. If not, see <http://www.gnu.org/licenses/>.
-
--->
-<resources>
-
- <style name="Theme.AboutOss" parent="android:Theme.Material.Light.NoActionBar" />
-</resources>
\ No newline at end of file