Skip to content

Commit

Permalink
Merge pull request #962 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz committed Feb 28, 2024
2 parents e044cb7 + 78ecebf commit f2f5b81
Show file tree
Hide file tree
Showing 47 changed files with 354 additions and 345 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
os: [macos-14, ubuntu-latest, windows-latest]

runs-on: ${{matrix.os}}

Expand All @@ -33,16 +33,8 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Checkout Gradle Build Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/wrapper/dists/**/gradle*.zip
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Cache konan
uses: actions/cache@v3
Expand All @@ -65,7 +57,7 @@ jobs:
./gradlew publishPlugins | true
- name: Publish the macOS artifacts
if: matrix.os == 'macOS-latest'
if: matrix.os == 'macos-14'
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PASSWORD }}
Expand Down Expand Up @@ -122,16 +114,8 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Checkout Gradle Build Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/wrapper/dists/**/gradle*.zip
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Publish plugin locally
run: |
Expand Down
22 changes: 3 additions & 19 deletions .github/workflows/gradle-dependency-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,7 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Checkout Gradle Build Cache
uses: actions/cache@v3
- name: Setup Gradle & Submit dependency graphs
uses: gradle/actions/setup-gradle@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/wrapper/dists/**/gradle*.zip
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Submit Dependency Graph
uses: mikepenz/gradle-dependency-submission@v0.9.1
with:
gradle-build-module: |-
:app
:app-desktop
gradle-build-configuration-mapping: |-
:app-desktop|compileClasspath
sub-module-mode: INDIVIDUAL_DEEP
dependency-graph: generate-and-submit
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Mike Penz
Copyright 2024 Mike Penz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

### What's included 🚀

- Kotlin Multiplatform support
- Kotlin Multiplatform support (including wasm)
- Lightweight multiplatform core module
- Access all generated information
- Build custom UIs
Expand All @@ -39,8 +39,8 @@

## Latest releases 🛠

- (Next Gen) Kotlin && Multiplatform && Plugin | [v10.10.0](https://github.com/mikepenz/AboutLibraries/tree/v10.10.0)
- Kotlin && Gradle Plugin | [v8.9.4](https://github.com/mikepenz/AboutLibraries/tree/v8.9.4)
- Kotlin && Multiplatform && Plugin | [v10.10.0](https://github.com/mikepenz/AboutLibraries/tree/v10.10.0)
- Compose 1.6.1 / Compose Multiplatform 1.6.0 | [v11.1.0](https://github.com/mikepenz/AboutLibraries/tree/v11.1.0)

## Gradle Plugin

Expand Down Expand Up @@ -104,6 +104,7 @@ aboutLibraries {
// Define the output file name. Modifying this will disable the automatic meta data discovery for supported platforms.
outputFileName = "aboutlibraries.json"
// Define the path configuration files are located in. E.g. additional libraries, licenses to add to the target .json
// Warning: Please do not use the parent folder of a module as path, as this can result in issues. More details: https://github.com/mikepenz/AboutLibraries/issues/936
configPath = "config"
// Allow to enable "offline mode", will disable any network check of the plugin (including [fetchRemoteLicense] or pulling spdx license texts)
offlineMode = false
Expand Down Expand Up @@ -416,7 +417,7 @@ Additional dependencies can be provided via the plugins API to extend and provid

# License

Copyright 2021 Mike Penz
Copyright 2024 Mike Penz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
11 changes: 8 additions & 3 deletions aboutlibraries-compose-m2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ android {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "11"

kotlinOptions {
jvmTarget = "11"

if (project.findProperty("composeCompilerReports") == "true") {
freeCompilerArgs += listOf(
"-P",
Expand All @@ -49,6 +49,12 @@ android {
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
)
}

val outputDir = rootDir.resolve("aboutlibraries-core/compose_compiler_config.conf").path
compilerOptions.freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=${outputDir}"
)
}
}

Expand Down Expand Up @@ -100,7 +106,6 @@ kotlin {
implementation(compose.ui)
implementation(compose.foundation)
implementation(compose.material)
implementation(libs.kotlinx.collections)
}
}
val commonTest by getting
Expand Down
2 changes: 1 addition & 1 deletion aboutlibraries-compose-m2/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
POM_NAME=AboutLibraries Library
POM_NAME=AboutLibraries Compose Material 2 Library
POM_DESCRIPTION=AboutLibraries automatically detects all dependencies of a project and collects their information including the license. Optionally visualising it via the provided ui components.
POM_ARTIFACT_ID=aboutlibraries-compose
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.viewinterop.AndroidView
import androidx.core.text.HtmlCompat
import com.mikepenz.aboutlibraries.Libs
import com.mikepenz.aboutlibraries.entity.Library
import com.mikepenz.aboutlibraries.ui.compose.data.fakeData
import com.mikepenz.aboutlibraries.ui.compose.util.StableLibrary
import com.mikepenz.aboutlibraries.ui.compose.util.htmlReadyLicenseContent
import com.mikepenz.aboutlibraries.ui.compose.util.stable
import com.mikepenz.aboutlibraries.util.withContext
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
Expand All @@ -47,7 +46,7 @@ fun LibrariesContainer(
itemContentPadding: PaddingValues = LibraryDefaults.ContentPadding,
itemSpacing: Dp = LibraryDefaults.LibraryItemSpacing,
header: (LazyListScope.() -> Unit)? = null,
onLibraryClick: ((StableLibrary) -> Unit)? = null,
onLibraryClick: ((Library) -> Unit)? = null,
) {
val context = LocalContext.current

Expand All @@ -57,7 +56,7 @@ fun LibrariesContainer(
}
}
LibrariesContainer(
libraries.value?.stable,
libraries.value,
modifier,
lazyListState,
contentPadding,
Expand All @@ -72,7 +71,7 @@ fun LibrariesContainer(
onLibraryClick,
licenseDialogBody = { library ->
HtmlText(
html = library.library.licenses.firstOrNull()?.htmlReadyLicenseContent.orEmpty(),
html = library.licenses.firstOrNull()?.htmlReadyLicenseContent.orEmpty(),
color = colors.contentColor,
)
}
Expand All @@ -97,7 +96,7 @@ fun HtmlText(
fun PreviewLibraries() {
MaterialTheme {
Surface {
Libraries(fakeData.libraries.stable)
Libraries(fakeData.libraries)
}
}
}
Expand All @@ -108,7 +107,7 @@ fun PreviewLibraries() {
fun PreviewLibrariesOff() {
MaterialTheme {
Surface {
Libraries(fakeData.libraries.stable, showAuthor = false, showLicenseBadges = false)
Libraries(fakeData.libraries, showAuthor = false, showLicenseBadges = false)
}
}
}
Expand All @@ -119,7 +118,7 @@ fun PreviewLibrary() {
MaterialTheme {
Surface {
Library(
fakeData.libraries.first().stable
fakeData.libraries.first()
) {
// on-click
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.mikepenz.aboutlibraries.Libs
import com.mikepenz.aboutlibraries.ui.compose.util.StableLibrary
import com.mikepenz.aboutlibraries.ui.compose.util.stable
import com.mikepenz.aboutlibraries.entity.Library

/**
* Displays all provided libraries in a simple list.
Expand All @@ -30,9 +29,9 @@ fun LibrariesContainer(
itemContentPadding: PaddingValues = LibraryDefaults.ContentPadding,
itemSpacing: Dp = LibraryDefaults.LibraryItemSpacing,
header: (LazyListScope.() -> Unit)? = null,
onLibraryClick: ((StableLibrary) -> Unit)? = null,
onLibraryClick: ((Library) -> Unit)? = null,
) {
val libs = Libs.Builder().withJson(aboutLibsJson).build().stable
val libs = Libs.Builder().withJson(aboutLibsJson).build()
LibrariesContainer(
libs,
modifier = modifier,
Expand All @@ -48,7 +47,7 @@ fun LibrariesContainer(
header = header,
onLibraryClick = onLibraryClick,
licenseDialogBody = { library ->
Text(library.library.licenses.firstOrNull()?.licenseContent ?: "")
Text(library.licenses.firstOrNull()?.licenseContent ?: "")
}
)
}
Expand All @@ -70,9 +69,9 @@ fun LibrariesContainer(
itemContentPadding: PaddingValues = LibraryDefaults.ContentPadding,
itemSpacing: Dp = LibraryDefaults.LibraryItemSpacing,
header: (LazyListScope.() -> Unit)? = null,
onLibraryClick: ((StableLibrary) -> Unit)? = null,
onLibraryClick: ((Library) -> Unit)? = null,
) {
val libs = librariesBlock().stable
val libs = librariesBlock()

LibrariesContainer(
libs,
Expand All @@ -89,7 +88,7 @@ fun LibrariesContainer(
header,
onLibraryClick,
licenseDialogBody = { library ->
Text(library.library.licenses.firstOrNull()?.licenseContent ?: "")
Text(library.licenses.firstOrNull()?.licenseContent ?: "")
}
)

Expand Down

0 comments on commit f2f5b81

Please sign in to comment.