Skip to content

Commit

Permalink
Merge pull request #2799 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz authored Aug 15, 2023
2 parents 8a921ae + 76c583b commit 46fcb2e
Show file tree
Hide file tree
Showing 24 changed files with 233 additions and 112 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 100

- uses: actions/setup-java@v1
- uses: actions/setup-java@v3
with:
java-version: '11'
java-package: jdk
distribution: 'zulu'
java-version: |
11
15
17
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
Expand All @@ -30,7 +33,7 @@ jobs:

- name: Checkout Gradle Build Cache
if: ${{ steps.self_hosted.outputs.FLAG != 'self-hosted' }}
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
Expand All @@ -55,7 +58,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 Expand Up @@ -107,14 +110,14 @@ jobs:
find . -name "*.aab" -type f -exec cp {} "artifacts" \;
- name: Archive Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: "App-Artifacts"
path: artifacts/*

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
uses: mikepenz/release-changelog-builder-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
configuration: ".github/config/configuration.json"
Expand All @@ -123,7 +126,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae
uses: mikepenz/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{steps.github_release.outputs.changelog}}
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/gradle-dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Gradle Dependency Submission
on:
push:
branches:
- develop

jobs:
gradle-dependency-detection:
runs-on: ubuntu-latest
# The Dependency Submission API requires write permission
permissions:
contents: write
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: |
11
15
17
- 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/gradle-dependency-submission@main
with:
gradle-build-module: :app
gradle-build-configuration: debugCompileClasspath
sub-module-mode: INDIVIDUAL_DEEP
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.5)
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.13.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.1)
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
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,40 +49,52 @@

## Latest releases 🛠

- Kotlin && Material 3 | [v9.0.1](https://github.com/mikepenz/MaterialDrawer/tree/v9.0.1)
- Kotlin | [v8.4.5](https://github.com/mikepenz/MaterialDrawer/tree/v8.4.5)
- Java && AndroidX | [v6.1.2](https://github.com/mikepenz/MaterialDrawer/tree/v6.1.2)
- Java && AppCompat | [v6.0.9](https://github.com/mikepenz/MaterialDrawer/tree/v6.0.9)

- Kotlin && Material 3 | [v9.0.2](https://github.com/mikepenz/MaterialDrawer/tree/v9.0.2)
- Kotlin | [v8.4.5](https://github.com/mikepenz/MaterialDrawer/tree/v8.4.5) (Provided as-is only)
- Java && AndroidX | [v6.1.2](https://github.com/mikepenz/MaterialDrawer/tree/v6.1.2) (Provided as-is only)
- Java && AppCompat | [v6.0.9](https://github.com/mikepenz/MaterialDrawer/tree/v6.0.9) (Provided as-is only)

### 1. Provide the gradle dependency

The latest release is available
on [Maven Central](https://search.maven.org/artifact/com.mikepenz/materialdrawer/9.0.1/aar).

```gradle
implementation "com.mikepenz:materialdrawer:${lastestMaterialDrawerRelease}"
implementation("com.mikepenz:materialdrawer:9.0.1")
```

```gradle
//required support lib modules
implementation "androidx.appcompat:appcompat:${versions.appcompat}"
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
implementation "androidx.annotation:annotation:${versions.annotation}"
implementation "com.google.android.material:material:1.5.0-alpha05" // requires at least 1.5.0-x
implementation "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}"
```

[NavController Support @ Maven Central](https://search.maven.org/artifact/com.mikepenz/materialdrawer-nav/9.0.1/aar).

```gradle
// Add for NavController support
implementation "com.mikepenz:materialdrawer-nav:${lastestMaterialDrawerRelease}"
```

[Android-Iconics Support @ Maven Central](https://search.maven.org/artifact/com.mikepenz/materialdrawer-iconics/9.0.1/aar)
.

```gradle
// Add for Android-Iconics support
implementation "com.mikepenz:materialdrawer-iconics:${lastestMaterialDrawerRelease}"
```
You can find dependency versions and all library releases on [MVN Repository](https://mvnrepository.com/artifact/com.mikepenz/materialdrawer).

### 2. Add the `Drawer` into the XML

The `MaterialDrawerSliderView` has to be provided as child of the `DrawerLayout` and will as such act as the slider

```kotlin
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root"
<androidx.drawerlayout.widget.DrawerLayout xmlns : android ="http://schemas.android.com/apk/res/android"
xmlns:app = "http://schemas.android.com/apk/res-auto"
android:id = "@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
Expand Down
13 changes: 8 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if (getSigningFile() != null) {
}

android {
namespace = "com.mikepenz.materialdrawer.app"
compileSdkVersion setup.compileSdk

defaultConfig {
Expand Down Expand Up @@ -48,12 +49,12 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
}
}

Expand All @@ -70,12 +71,14 @@ dependencies {
implementation "androidx.cardview:cardview:${versions.cardview}"
implementation "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}"
implementation("androidx.slidingpanelayout:slidingpanelayout:${versions.slidingpaneLayout}") {
force true
version {
strictly "${versions.slidingpaneLayout}"
}
}
implementation "androidx.swiperefreshlayout:swiperefreshlayout:${versions.swiperefreshLayout}"

// used to showcase how to load images
implementation("io.coil-kt:coil:2.1.0")
implementation("io.coil-kt:coil:2.4.0")

// the sample uses more advanced functions of the fastadapter
// https://github.com/mikepenz/FastAdapter/
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.materialdrawer.app">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

Expand All @@ -17,6 +16,7 @@
<activity
android:name=".DrawerActivity"
android:label="@string/app_name"
android:exported="true"
android:theme="@style/SampleApp.DayNight">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ class CompactHeaderDrawerActivity : AppCompatActivity() {

override fun onCreateActionMode(mode: ActionMode, menu: Menu): Boolean {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
window.statusBarColor = getThemeColor(R.attr.colorPrimaryDark, ContextCompat.getColor(this@CompactHeaderDrawerActivity, R.color.colorPrimaryDark))
window.statusBarColor =
getThemeColor(android.R.attr.colorPrimaryDark, ContextCompat.getColor(this@CompactHeaderDrawerActivity, R.color.colorPrimaryDark))
}

mode.menuInflater.inflate(R.menu.cab, menu)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class MiniDrawerActivity : AppCompatActivity() {
miniSliderView.crossFader = CrossfadeWrapper(crossFader)

//define a shadow (this is only for normal LTR layouts if you have a RTL app you need to define the other one
crossFader.getCrossFadeSlidingPaneLayout().setShadowResourceLeft(R.drawable.material_drawer_shadow_left)
crossFader.getCrossFadeSlidingPaneLayout().setShadowResourceLeft(com.mikepenz.materialdrawer.R.drawable.material_drawer_shadow_left)
}

override fun onSaveInstanceState(_outState: Bundle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CustomUrlPrimaryDrawerItem : CustomUrlBasePrimaryDrawerItem<CustomUrlPrima

override val layoutRes: Int
@LayoutRes
get() = R.layout.material_drawer_item_primary
get() = com.mikepenz.materialdrawer.R.layout.material_drawer_item_primary

override fun bindView(holder: ViewHolder, payloads: List<Any>) {
super.bindView(holder, payloads)
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/ids.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
<item name="crossFadeSlider" type="id" />
<item name="crossFadeSmallView" type="id" />
<item name="crossFadeLargeView" type="id" />

<item name="about_libraries" type="id"/>
</resources>
Loading

0 comments on commit 46fcb2e

Please sign in to comment.