Skip to content

Commit

Permalink
Merge pull request #56 from ImaginativeShohag/dev
Browse files Browse the repository at this point in the history
Convert to catalog, barcode example, pager example
  • Loading branch information
ImaginativeShohag authored Dec 27, 2024
2 parents 03e3712 + 68c2da5 commit 7664af4
Show file tree
Hide file tree
Showing 86 changed files with 5,059 additions and 953 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build-beta-upload-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls /dev/kvm
- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -49,6 +56,23 @@ jobs:
fileName: "android_keystore.keystore"
encodedString: ${{ secrets.KEYSTORE }}

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup GMD
run: ./gradlew :benchmarks:pixel6Api35Setup
--info
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"

- name: Generate baseline profile
run: ./gradlew :app:generateBaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
-Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=5

- name: Build & deploy Android release
run: bundle exec fastlane android beta
env:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/build-production-upload-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls /dev/kvm
- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -46,6 +53,23 @@ jobs:
fileName: "android_keystore.keystore"
encodedString: ${{ secrets.KEYSTORE }}

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup GMD
run: ./gradlew :benchmarks:pixel6Api35Setup
--info
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"

- name: Generate baseline profile
run: ./gradlew :app:generateBaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
-Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=5

- name: Build & deploy Android release
run: bundle exec fastlane android deploy
env:
Expand Down
43 changes: 30 additions & 13 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
Expand Down Expand Up @@ -61,6 +50,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls /dev/kvm
- name: Initialize local properties
env:
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}
Expand Down Expand Up @@ -89,8 +85,8 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -102,6 +98,27 @@ jobs:
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run tests
run: ./gradlew test

- name: Setup GMD
run: ./gradlew :benchmarks:pixel6Api35Setup
--info
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"

- name: Build all build type and flavor permutations (Ignore baseline profile generation)
run: ./gradlew assemble
-Pandroidx.baselineprofile.skipgeneration
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
-Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=5

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
release/
generated/
# Uncomment the following line in case you need and you don't have the release build type files in your app
release/*

# Gradle files
.gradle/
Expand Down
4 changes: 2 additions & 2 deletions .idea/ktlint-plugin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .run/spotlessApply.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="spotlessApply" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="--init-script=gradle/init.gradle.kts" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="spotlessApply" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Feel free to request features or suggestions for improvements.

- Counter (Beginner)
- Counter with ViewModel (Beginner)
- AnimatedVisibility (Beginner)
- `AnimatedVisibility` (Beginner)
- Lottie (Beginner)
- Select image and crop for upload (Intermediate)
- Capture image and crop for upload (Intermediate)
Expand All @@ -71,6 +71,8 @@ Feel free to request features or suggestions for improvements.
- [Deep Link](https://developer.android.com/training/app-links) (Intermediate)
- Navigation Data Pass (Intermediate)
- Reactive Model (Beginner)
- Baseline Profiles (Intermediate)
- [Barcode Scanner](https://developers.google.com/ml-kit/vision/barcode-scanning) ([Google code scanner](https://developers.google.com/ml-kit/vision/barcode-scanning/code-scanner) and [ML Kit Barcode](https://developers.google.com/ml-kit/vision/barcode-scanning/android)) (Intermediate)

| ![Counter](images/counter.gif) | ![Animated Visibility](images/animated-visibility.gif) | ![Lottie](images/lottie.gif) |
|:------------------------------------:|:------------------------------------------------------:|:----------------------------:|
Expand Down Expand Up @@ -102,6 +104,9 @@ Feel free to request features or suggestions for improvements.
- [x] Update `popBackStack()`
- [ ] Migrate ExoPlayer: https://developer.android.com/media/media3/exoplayer/migration-guide
- [ ] Update all `LaunchedEffect` with lambda issue using `rememberUpdatedState`: https://developer.android.com/develop/ui/compose/side-effects#rememberupdatedstate
- [ ] Add example for AppColorLocal from Jaber vai
- [x] Update to coil 3
- [ ] Update ktlint

# Note

Expand All @@ -117,7 +122,7 @@ Feel free to request features or suggestions for improvements.
with [klint](https://github.com/pinterest/ktlint). Apply spotless using the following command.

```bash
./gradlew spotlessApply
./gradlew --init-script gradle/init.gradle.kts spotlessApply
```

## Setup
Expand Down
Loading

0 comments on commit 7664af4

Please sign in to comment.