Skip to content

Commit

Permalink
Merge pull request #805 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz authored Sep 29, 2022
2 parents 1179561 + 4852c0a commit 3301650
Show file tree
Hide file tree
Showing 34 changed files with 801 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6.3'
ruby-version: '3.0'
bundler-cache: true

- name: Run Danger
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/gradle-dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Gradle Dependency Submission
on:
push:
branches:
- develop

jobs:
gradle-dependency-detection:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '15'

- 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: Submit Dependency Graph
uses: mikepenz/[email protected]
with:
gradle-build-module: |-
:app
:app-desktop
gradle-build-configuration-mapping: |-
:app-desktop|compileClasspath
sub-module-mode: INDIVIDUAL_DEEP
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ captures/
*.podspec

# docs
docs
docs

/.bundle/
/vendor/*
73 changes: 48 additions & 25 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
ansi (1.5.0)
ast (2.4.1)
claide (1.0.3)
ast (2.4.2)
claide (1.1.0)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
colored2 (3.1.2)
cork (0.3.0)
colored2 (~> 3.1)
danger (8.0.6)
danger (9.0.0)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand All @@ -24,47 +24,70 @@ GEM
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
danger-android_lint (0.0.8)
octokit (~> 5.0)
terminal-table (>= 1, < 4)
danger-android_lint (0.0.11)
danger-plugin-api (~> 1.0)
oga
danger-kotlin_detekt (0.0.3)
danger-plugin-api (~> 1.0)
danger-plugin-api (1.0.0)
danger (> 2.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faraday-http-cache (2.2.0)
faraday (1.10.2)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-http-cache (2.4.1)
faraday (>= 0.8)
git (1.11.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
git (1.12.0)
addressable (~> 2.8)
rchardet (~> 1.8)
kramdown (2.3.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
multipart-post (2.1.1)
multipart-post (2.2.3)
nap (1.1.0)
no_proxy_fix (0.1.2)
octokit (4.18.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
oga (3.3)
octokit (5.6.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
oga (3.4)
ast
ruby-ll (~> 2.1)
open4 (1.3.4)
public_suffix (4.0.6)
public_suffix (5.0.0)
rchardet (1.8.0)
rexml (3.2.5)
ruby-ll (2.1.2)
ansi
ast
sawyer (0.8.2)
ruby2_keywords (0.0.5)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
faraday (>= 0.17.3, < 3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.3.0)

PLATFORMS
ruby
Expand All @@ -75,4 +98,4 @@ DEPENDENCIES
danger-kotlin_detekt

BUNDLED WITH
2.1.4
2.3.11
46 changes: 39 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

## Latest releases 🛠

- (Next Gen) Kotlin && Multiplatform && Plugin | [v10.4.0](https://github.com/mikepenz/AboutLibraries/tree/v10.4.0)
- (Next Gen) Kotlin && Multiplatform && Plugin | [v10.5.0](https://github.com/mikepenz/AboutLibraries/tree/v10.5.0)
- Kotlin && Gradle Plugin | [v8.9.4](https://github.com/mikepenz/AboutLibraries/tree/v8.9.4)

## Gradle Plugin
Expand All @@ -48,6 +48,35 @@ AboutLibraries v10 includes a completely redone plugin, with build cache support

> The gradle plugin is hosted via [Gradle Plugins](https://plugins.gradle.org/plugin/com.mikepenz.aboutlibraries.plugin).
<details open><summary><b>Using the plugins DSL (for single modules)</b></summary>
<p>


```gradle
// Root build.gradle
id 'com.mikepenz.aboutlibraries.plugin' version "${latestAboutLibsRelease}" apply false
// App build.gradle
id 'com.mikepenz.aboutlibraries.plugin'
```

</p>
</details>

<details><summary><b>Using the plugins DSL (for whole project)</b></summary>
<p>

```gradle
// Root build.gradle
id 'com.mikepenz.aboutlibraries.plugin' version "${latestAboutLibsRelease}"
```

</p>
</details>

<details><summary><b>Using legacy plugin application</b></summary>
<p>

```gradle
// Root build.gradle
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}"
Expand All @@ -56,7 +85,10 @@ classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAbou
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
```

<details><summary><b>Configuration</b></summary>
</p>
</details>

<details><summary><b>Gradle Plugin Configuration</b></summary>
<p>

## Gradle Plugin Configuration
Expand All @@ -66,7 +98,7 @@ It is possible to provide custom configurations / adjustments to the automatic d
```groovy
aboutLibraries {
// - If the automatic registered android tasks are disabled, a similar thing can be achieved manually
// - `./gradlew app:exportLibraryDefinitions -PexportPath=src/main/res/raw`
// - `./gradlew app:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/res/raw`
// - the resulting file can for example be added as part of the SCM
registerAndroidTasks = false
// Define the output file name. Modifying this will disable the automatic meta data discovery for supported platforms.
Expand Down Expand Up @@ -203,7 +235,7 @@ Find a sample application as the `app-desktop` module. It showcases the usage to
### Generate Dependency Information

```bash
./gradlew app-desktop:exportLibraryDefinitions -PexportPath=src/main/resources/
./gradlew app-desktop:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/resources/
```

### Run Desktop app
Expand Down Expand Up @@ -309,7 +341,7 @@ aboutLibraries {
This is especially beneficial for enterprise environments where it is required to be in full control of the included `aboutlibraries.json`.
After disabling the integration it is possible to manually update the definitions, or do it on your CI environment.
```
./gradlew app:exportLibraryDefinitions -PexportPath=src/main/res/raw/ -PexportVariant=release
./gradlew app:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/res/raw/ -PaboutLibraries.exportVariant=release
```
This generated file can be either included in your SCM, and every build will use this exact verified and approved state.
Additionally, this helps to ensure no issues occur during the apps delivery phase, as the respective file is already generated and included.
Expand All @@ -333,9 +365,9 @@ For other environments or for more advanced usages the plugin offers additional
```bash
# Manually generate the dependency metaData in the provided location. Allows to commit it in SCM
# Exports the metaData in `src/main/resources/` relative to the module root
./gradlew app-desktop:exportLibraryDefinitions -PexportPath=src/main/resources/
./gradlew app-desktop:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/resources/
# Export only for a specific variant: `release`
./gradlew app-desktop:exportLibraryDefinitions -PexportPath=src/main/resources/ -PexportVariant=release
./gradlew app-desktop:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/resources/ -PaboutLibraries.exportVariant=release

# Export dependencies as CSV
./gradlew exportLibraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
Expand Down Expand Up @@ -98,7 +97,7 @@ fun Libraries(
header: (LazyListScope.() -> Unit)? = null,
onLibraryClick: ((Library) -> Unit)? = null,
) {
val openDialog = rememberSaveable { mutableStateOf<Library?>(null) }
val openDialog = remember { mutableStateOf<Library?>(null) }

LazyColumn(modifier, state = lazyListState, contentPadding = contentPadding) {
header?.invoke(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.mikepenz.aboutlibraries.LibsBuilder.Companion.BUNDLE_TITLE
import com.mikepenz.aboutlibraries.R
import com.mikepenz.aboutlibraries.util.applyEdgeSystemUi
import com.mikepenz.aboutlibraries.util.doOnApplySystemWindowInsets
import com.mikepenz.aboutlibraries.util.getThemeColor


/**
Expand Down Expand Up @@ -70,8 +71,10 @@ open class LibsActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
menuInflater.inflate(R.menu.menu_aboutlibs, menu)
val searchView = menu.findItem(R.id.action_menu_search).actionView as? SearchView
val editText = searchView?.findViewById<EditText>(androidx.appcompat.R.id.search_src_text)
editText?.setTextColor(Color.WHITE)
editText?.setHintTextColor(Color.WHITE)

editText?.setTextColor(searchView.context.getThemeColor(R.attr.colorControlNormal))
editText?.setHintTextColor(searchView.context.getThemeColor(R.attr.colorControlNormal))

searchView?.maxWidth = Int.MAX_VALUE
searchView?.setOnQueryTextListener(this)
}
Expand Down
2 changes: 1 addition & 1 deletion app-desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Generate Dependency Information

```bash
./gradlew app-desktop:exportLibraryDefinitions -PexportPath=src/main/resources/
./gradlew app-desktop:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/resources/
```

### Run Desktop app
Expand Down
2 changes: 1 addition & 1 deletion app-desktop/src/main/resources/aboutlibraries.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
### Generate Dependency Information

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

2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ android {
// It is possible to define a custom config path with custom mappings
aboutLibraries {
// - if the automatic registered android tasks are disabled, a similar thing can be achieved manually
// - `./gradlew app:exportLibraryDefinitions -PexportPath=src/main/res/raw`
// - `./gradlew app:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/res/raw`
// - the resulting file can for example be added as part of the SCM
// registerAndroidTasks = false

Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="customTestColor">#000</color>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
<color name="colorPrimary">#2196F3</color>
<color name="colorPrimaryDark">#1976D2</color>
<color name="colorAccent">#FF4081</color>

<color name="customTestColor">#FFF</color>
</resources>
6 changes: 3 additions & 3 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<item name="windowActionModeOverlay">true</item>

<item name="toolbarStyle">@style/CustomToolbarStyle</item>
<item name="colorControlNormal">@android:color/white</item>
<item name="colorControlNormal">@color/customTestColor</item>
</style>

<style name="CustomToolbarStyle" parent="Widget.Material3.Toolbar">
Expand All @@ -23,10 +23,10 @@
</style>

<style name="CustomTitleTextAppearance" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
<item name="android:textColor">@android:color/white</item>
<item name="android:textColor">@color/customTestColor</item>
</style>

<style name="CustomSubTitleTextAppearance" parent="TextAppearance.Widget.AppCompat.Toolbar.Subtitle">
<item name="android:textColor">@android:color/white</item>
<item name="android:textColor">@color/customTestColor</item>
</style>
</resources>
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GROUP=com.mikepenz
VERSION_NAME=10.4.0
VERSION_CODE=100400
VERSION_NAME=10.5.0
VERSION_CODE=100500

POM_URL=https://github.com/mikepenz/AboutLibraries
POM_SCM_URL=https://github.com/mikepenz/AboutLibraries
Expand Down
Loading

0 comments on commit 3301650

Please sign in to comment.