diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..1f5e3bf --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ + +# These are supported funding model platforms +github: agronick +custom: ["https://www.paypal.me/kagronick"] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..9d0791f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,17 @@ +--- +name: Bug report +about: Please write your issue in English. Check the discussions page if this is not a bug. +title: "[BUG]" +labels: '' +assignees: '' + +--- + +| :exclamation: Please write your issue in English | +|---------------------------------------------------| + +**Describe the bug** +Check the discussions page if this is not a bug. A clear and concise description of what the bug is. +Be as descriptive as possible. Check +the [discussions](https://github.com/agronick/aa-torque/discussions) +page first. If this is not a bug, you can make a post on the discussions page. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..d36cbc7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[REQUEST]" +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..68d5748 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,91 @@ +name: ci +on: [ push ] +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '19' + + - name: Cache Gradle and wrapper + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + + - name: Build Release apk + run: ./gradlew lintRelease + + build_deploy: + runs-on: ubuntu-latest + permissions: + contents: write + discussions: write + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '19' + + - name: Restore keystore + run: echo ${{ secrets.DEBUG_KEYSTORE }} | base64 -d > $HOME/debug.keystore + + - name: Cache Gradle and wrapper + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + + - name: Bump version + id: bump_version + if: github.repository == 'agronick/flattery' + uses: oflynned/android-version-bump@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: rickstaa/action-create-tag@v1 + id: "tag_create" + with: + tag: "latest" + tag_exists_error: false + force_push_tag: true + message: "Latest release" + + - name: Build Release apk + if: github.repository == 'agronick/flattery' + run: > + ./gradlew assembleRelease + -Pandroid.injected.signing.store.file=$HOME/debug.keystore + -Pandroid.injected.signing.key.alias=androiddebugkey + -Pandroid.injected.signing.store.password=android + -Pandroid.injected.signing.key.password=android + + - name: Build Release apk for forked repos + if: github.repository != 'agronick/flattery' + run: > + ./gradlew assembleRelease + + - name: Rename release + run: mv app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/flattery.apk + + - name: Create Github Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ steps.bump_version.outputs.new_tag || 'latest' }} + name: ${{ steps.bump_version.outputs.new_tag || 'latest' }} + generate_release_notes: true + draft: true + files: | + app/build/outputs/apk/release/flattery.apk + app/build/outputs/mapping/release/mapping.txt diff --git a/app/build.gradle b/app/build.gradle index 98d61d7..65e9efd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,13 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' +Properties props = new Properties() +props.load(new FileInputStream("$project.rootDir/version.properties")) + +def versionMajor = props.getProperty("majorVersion") as Integer +def versionMinor = props.getProperty("minorVersion") as Integer +def versionPatch = props.getProperty("patchVersion") as Integer + android { compileSdk 34 namespace = "com.agronick.launcher" @@ -9,9 +16,8 @@ android { applicationId "com.agronick.launcher" minSdkVersion 28 targetSdkVersion 34 - versionCode 1 - versionName "1.0" - + versionCode versionMajor * 100 + versionMinor * 10 + versionPatch + versionName "${versionMajor}.${versionMinor}.${versionPatch}" } buildTypes { @@ -26,7 +32,7 @@ android { targetCompatibility JavaVersion.VERSION_19 } - kotlinOptions{ + kotlinOptions { jvmTarget = JavaVersion.VERSION_19 } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7454180..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/version.properties b/version.properties new file mode 100644 index 0000000..0324c55 --- /dev/null +++ b/version.properties @@ -0,0 +1,4 @@ +majorVersion=0 +minorVersion=0 +patchVersion=0 +buildNumber= \ No newline at end of file