-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from vipulyaara/develop
Merge develop to main
- Loading branch information
Showing
15 changed files
with
125 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Build Signed Release | ||
run-name: Build Signed Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
permissions: | ||
contents: write | ||
jobs: | ||
release-signing-build: | ||
name: Release Signing Build | ||
runs-on: ubuntu-latest | ||
env: | ||
RELEASE_KEYSTORE_PATH: ${{ secrets.RELEASE_KEYSTORE_PATH }} | ||
RELEASE_SIGNING_PASSWORD: ${{ secrets.RELEASE_SIGNING_PASSWORD }} | ||
RELEASE_SIGNING_USERNAME: ${{ secrets.RELEASE_SIGNING_PASSWORD }} | ||
RELEASE_SIGNING_ALIAS: ${{ secrets.RELEASE_SIGNING_ALIAS }} | ||
GOOGLE_SERVER_CLIENT_ID: ${{ secrets.GOOGLE_SERVER_CLIENT_ID }} | ||
PIPELESS_AUTH_TOKEN: ${{ secrets.PIPELESS_AUTH_TOKEN }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Checkout Sarahang | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: vipulyaara/sarahang | ||
path: Sarahang | ||
ref: master | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: gradle | ||
|
||
- name: Create Google Services JSON File | ||
env: | ||
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | ||
run: echo $GOOGLE_SERVICES_JSON | base64 -di > ./app/google-services.json | ||
|
||
- name: Decode Keystore | ||
env: | ||
ENCODED_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE_BASE64 }} | ||
DECODED_KEYSTORE_PATH: ${{ secrets.RELEASE_KEYSTORE_PATH }} | ||
run: | | ||
echo $ENCODED_KEYSTORE > keystore_base64.txt | ||
base64 -d keystore_base64.txt > $DECODED_KEYSTORE_PATH | ||
- name: Sign and Build Release Bundle | ||
env: | ||
RELEASE_KEYSTORE_PATH: ${{ secrets.RELEASE_KEYSTORE_PATH }} | ||
RELEASE_SIGNING_PASSWORD: ${{ secrets.RELEASE_SIGNING_PASSWORD }} | ||
RELEASE_SIGNING_USERNAME: ${{ secrets.RELEASE_SIGNING_PASSWORD }} | ||
RELEASE_SIGNING_ALIAS: ${{ secrets.RELEASE_SIGNING_ALIAS }} | ||
GOOGLE_SERVER_CLIENT_ID: ${{ secrets.GOOGLE_SERVER_CLIENT_ID }} | ||
PIPELESS_AUTH_TOKEN: ${{ secrets.PIPELESS_AUTH_TOKEN }} | ||
run: | ||
./gradlew assembleRelease | ||
|
||
- name: Retrieve Version | ||
run: | | ||
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew -q versionname)" | ||
id: android_version | ||
|
||
- name: Get version | ||
run: | | ||
echo "version_name=${{steps.android_version.outputs.VERSION_NAME}}" >> $GITHUB_ENV | ||
- name: Create Release on Github | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{env.version_name}} | ||
name: Release - ${{env.version_name}} | ||
generate_release_notes: true | ||
prerelease: true | ||
files: app/build/outputs/apk/release/app-release.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,3 +66,4 @@ fastlane/readme.md | |
/.idea/modules.xml | ||
/.idea/misc.xml | ||
|
||
/Sarahang/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
navigation/src/main/java/org/kafka/navigation/rememberBottomSheetNavigator.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 8 additions & 32 deletions
40
ui/common/src/main/java/org/kafka/common/extensions/elevation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,17 @@ | ||
package org.kafka.common.extensions | ||
|
||
import androidx.compose.foundation.ScrollState | ||
import androidx.compose.foundation.lazy.LazyListState | ||
import androidx.compose.foundation.lazy.grid.LazyGridState | ||
import androidx.compose.runtime.derivedStateOf | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
import ui.common.theme.theme.Dimens | ||
|
||
val ScrollState.elevation | ||
get() = derivedStateOf { | ||
this.run { ((value / 100) * 2).coerceAtMost(MaxElevation).dp } ?: 0.dp | ||
} | ||
|
||
val LazyListState.elevation: Dp | ||
get() = if (firstVisibleItemIndex == 0) { | ||
// For the first element, use the minimum of scroll offset and default elevation | ||
// i.e. a value between 0 and 4.dp | ||
minOf(firstVisibleItemScrollOffset.toFloat().dp, 24.dp) | ||
} else { | ||
// If not the first element, always set elevation and show the shadow | ||
24.dp | ||
} | ||
|
||
|
||
val LazyListState?.elevation | ||
get() = derivedStateOf { | ||
if (this?.firstVisibleItemIndex == 0) { | ||
minOf(firstVisibleItemScrollOffset.toFloat().dp, MaxElevation.dp) | ||
object Elevation { | ||
val LazyListState.elevation: Dp | ||
get() = if (firstVisibleItemIndex == 0) { | ||
// For the first element, use the minimum of scroll offset and default elevation | ||
// i.e. a value between 0 and 4.dp | ||
minOf(firstVisibleItemScrollOffset.toFloat().dp, 24.dp) | ||
} else { | ||
Dimens.Spacing20 | ||
// If not the first element, always set elevation and show the shadow | ||
24.dp | ||
} | ||
} | ||
|
||
|
||
fun LazyGridState.elevation(maxElevation: Int = 40) = derivedStateOf { | ||
this.run { firstVisibleItemScrollOffset.coerceAtMost(maxElevation) }.dp | ||
} | ||
|
||
private const val MaxElevation = 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters