Skip to content

Commit 6e8661b

Browse files
Merge branch 'develop'
2 parents 5a03336 + 9beb860 commit 6e8661b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+12061
-237
lines changed

.editorconfig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
root = true
2+
13
[*.{kt,kts}]
24
indent_size = 4
35
insert_final_newline = false
46

57
# noinspection EditorConfigKeyCorrectness
6-
disabled_rules = no-wildcard-imports, indent
7-
# FIXME https://github.com/pinterest/ktlint/issues/764
8+
ktlint_standard_no-wildcard-imports = disabled
9+
# noinspection EditorConfigKeyCorrectness
10+
ktlint_standard_trailing-comma-on-declaration-site = disabled

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ assignees: 'massivemadness'
1010
*Please consider making a Pull Request if you are capable of doing so.*
1111

1212
**Library Version:**
13-
2.5
13+
2.6
1414

1515
**Affected Device(s):**
1616
Google Pixel 3 XL with Android 9.0

.github/workflows/android.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,34 @@ name: Android CI
22

33
on:
44
push:
5-
branches: [ master, develop ]
5+
branches: [ "master", "develop" ]
66
pull_request:
7-
branches: [ master, develop ]
7+
branches: [ "master", "develop" ]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: set up JDK 11
15-
uses: actions/setup-java@v2
15+
uses: actions/setup-java@v3
1616
with:
1717
java-version: '11'
18-
distribution: 'adopt'
18+
distribution: 'temurin'
1919
cache: gradle
2020
- name: Grant execute permission for gradlew
2121
run: chmod +x gradlew
2222
- name: Build with Gradle
2323
run: ./gradlew :app:assembleDebug
2424
- name: Upload Debug APK
25-
uses: actions/upload-artifact@v2
25+
uses: actions/upload-artifact@v3
2626
with:
2727
name: Sample App (Debug)
28-
path: ./app/build/outputs/apk/debug/app-debug.apk
28+
path: ./app/build/outputs/apk/debug/app-debug.apk
29+
lint:
30+
needs: [ build ]
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Check Kotlin code style
35+
run: ./gradlew ktlint

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Add this to your module’s `build.gradle` file:
5050
```gradle
5151
dependencies {
5252
...
53-
implementation 'com.fragula2:fragula-core:2.5'
53+
implementation 'com.fragula2:fragula-core:2.6'
5454
}
5555
```
5656

@@ -298,7 +298,7 @@ Add this to your module’s `build.gradle` file:
298298
```gradle
299299
dependencies {
300300
...
301-
implementation 'com.fragula2:fragula-compose:2.5'
301+
implementation 'com.fragula2:fragula-compose:2.6'
302302
}
303303
```
304304

@@ -319,8 +319,7 @@ setContent {
319319
modifier = Modifier.fillMaxSize(),
320320
color = MaterialTheme.colors.background,
321321
) {
322-
val swipeBackNavigator = rememberSwipeBackNavigator()
323-
val navController = rememberNavController(swipeBackNavigator)
322+
val navController = rememberFragulaNavController()
324323
FragulaNavHost(navController, startDestination = "list") {
325324
// ...
326325
}
@@ -332,8 +331,7 @@ setContent {
332331
**Second,** you need to replace your `composable(...)` destinations with `swipeable(...)` as shown below:
333332

334333
```kotlin
335-
val swipeBackNavigator = rememberSwipeBackNavigator()
336-
val navController = rememberNavController(swipeBackNavigator)
334+
val navController = rememberFragulaNavController()
337335
FragulaNavHost(navController, startDestination = "list") {
338336
swipeable("list") {
339337
ListScreen(navController)
@@ -401,6 +399,7 @@ fun FragulaNavHost(
401399
startDestination: String,
402400
modifier: Modifier = Modifier,
403401
route: String? = null,
402+
onPageScrolled: (Int, Float, Int) -> Unit, // Scroll listener (position, offset, offsetPixels)
404403
scrimColor: Color = ScrimColor, // Color used for the dimming
405404
scrimAmount: Float = 0.15f, // Percentage of dimming (depends on drag offset)
406405
parallaxFactor: Float = 1.3f, // Parallax multiplier (depends on drag offset)

app/benchmark-rules.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-dontobfuscate

app/build.gradle

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ android {
2222

2323
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
2424
}
25+
buildTypes {
26+
benchmark {
27+
signingConfig signingConfigs.debug
28+
matchingFallbacks = ['release']
29+
proguardFiles 'benchmark-rules.pro'
30+
debuggable false
31+
}
32+
}
2533
compileOptions {
2634
sourceCompatibility JavaVersion.VERSION_11
2735
targetCompatibility JavaVersion.VERSION_11
@@ -50,6 +58,7 @@ dependencies {
5058
implementation library.core
5159
implementation library.activity
5260
implementation library.fragment
61+
implementation library.profileinstaller
5362

5463
// UI
5564
implementation library.appcompat
@@ -64,6 +73,7 @@ dependencies {
6473
implementation library.compose_preview
6574
debugImplementation library.compose_tooling
6675
debugImplementation library.compose_manifest
76+
implementation library.drawablepainter
6777

6878
// AAC
6979
implementation library.viewmodel
@@ -75,8 +85,7 @@ dependencies {
7585
implementation project(':fragula-core')
7686

7787
// Tests
78-
testImplementation testLibrary.junit
79-
80-
androidTestImplementation androidTestLibrary.junit_ext
81-
androidTestImplementation androidTestLibrary.test_runner
88+
testImplementation library.junit
89+
androidTestImplementation library.junit_ext
90+
androidTestImplementation library.test_runner
8291
}

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
34

45
<application
56
android:allowBackup="true"
@@ -34,6 +35,10 @@
3435
</intent-filter>
3536
</activity>
3637

38+
<profileable
39+
android:shell="true"
40+
tools:targetApi="29" />
41+
3742
</application>
3843

3944
</manifest>

0 commit comments

Comments
 (0)