forked from sadellie/unitto
-
Notifications
You must be signed in to change notification settings - Fork 9
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 #1 from Myzel394/first-improvements
First improvements
- Loading branch information
Showing
450 changed files
with
9,129 additions
and
10,361 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,7 @@ | ||
# https://editorconfig.org/ | ||
# This configuration is used by ktlint when spotless invokes it | ||
|
||
[*.{kt,kts}] | ||
ij_kotlin_allow_trailing_comma=true | ||
ij_kotlin_allow_trailing_comma_on_call_site=true | ||
ktlint_function_naming_ignore_when_annotated_with=Composable, Test |
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,34 @@ | ||
name: Prepare KeyStore | ||
description: Write the KeyStore file and properties to disk | ||
|
||
inputs: | ||
signingStorePassword: | ||
description: 'The password for the KeyStore' | ||
required: true | ||
signingKeyPassword: | ||
description: 'The password for the Key' | ||
required: true | ||
signingKeyAlias: | ||
description: 'The alias for the Key' | ||
required: true | ||
keyStoreBase64: | ||
description: 'The KeyStore file encoded as base64' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Write Keystore file 🗄️ | ||
id: android_keystore | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: key.jks | ||
encodedString: ${{ inputs.keyStoreBase64 }} | ||
|
||
- name: Write Keystore properties 🗝️ | ||
shell: bash | ||
run: | | ||
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > key.properties | ||
echo "storePassword=${{ inputs.signingStorePassword }}" >> key.properties | ||
echo "keyPassword=${{ inputs.signingKeyPassword }}" >> key.properties | ||
echo "keyAlias=${{ inputs.signingKeyAlias }}" >> key.properties |
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,31 @@ | ||
name: Build and push debug app | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
debug-builds: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: gradle/wrapper-validation-action@v2 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "adopt" | ||
java-version: 21 | ||
cache: "gradle" | ||
|
||
- name: Run tests | ||
run: ./gradlew test | ||
|
||
- name: Compile | ||
run: ./gradlew assembleDebug | ||
|
||
- name: Upload APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: numberhub-app-debug-apks | ||
path: app/build/outputs/apk/fdroid/debug/app-*-debug.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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build and publish app | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
release-app-github: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: gradle/wrapper-validation-action@v2 | ||
|
||
- name: Write KeyStore 🗝️ | ||
uses: ./.github/actions/prepare-keystore | ||
with: | ||
signingStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }} | ||
signingKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} | ||
signingKeyAlias: ${{ secrets.SIGNING_KEY_ALIAS }} | ||
keyStoreBase64: ${{ secrets.KEYSTORE }} | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 21 | ||
cache: 'gradle' | ||
|
||
- name: Build APKs 📱 | ||
run: ./gradlew assembleRelease | ||
|
||
- name: Build AABs 📱 | ||
run: ./gradlew bundleRelease | ||
|
||
- name: Upload APKs 🚀 | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
files: app/build/outputs/apk/fdroid/release/*.apk | ||
|
||
- name: Upload APKs bundles 🚀 | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
files: app/build/outputs/bundle/fdroidRelease/*.aab |
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,42 @@ | ||
<!-- | ||
~ Unitto is a calculator for Android | ||
~ Copyright (c) 2024 Elshan Agaev | ||
~ | ||
~ This program is free software: you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation, either version 3 of the License, or | ||
~ (at your option) any later version. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
--> | ||
|
||
<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 --no-configuration-cache" /> | ||
<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> | ||
<ForceTestExec>false</ForceTestExec> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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,42 @@ | ||
<!-- | ||
~ Unitto is a calculator for Android | ||
~ Copyright (c) 2024 Elshan Agaev | ||
~ | ||
~ This program is free software: you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation, either version 3 of the License, or | ||
~ (at your option) any later version. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
--> | ||
|
||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="spotlessCheck" 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 --no-configuration-cache" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="spotlessCheck" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<ForceTestExec>false</ForceTestExec> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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
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
Oops, something went wrong.