Skip to content

Commit

Permalink
Merge pull request #2 from unlimish/develop
Browse files Browse the repository at this point in the history
fix syntax
  • Loading branch information
unlimish committed Jun 13, 2024
2 parents ea511cc + d9a38ae commit b0aa5fb
Show file tree
Hide file tree
Showing 26 changed files with 140 additions and 33 deletions.
45 changes: 44 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,47 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
- run: ./gradlew assemble
- name: Make gradlew executable
run: chmod +x ./gradlew
- run: ./gradlew assemble
- uses: actions/upload-artifact@v3
with:
path: '**/*.apk'
- uses: yumemi-inc/comment-pull-request@v1
if: cancelled() != true
with:
comment: 'CI passed.'
comment-if-failure: 'CI failed.'

release:
needs: check
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Make gradlew executable
run: chmod +x ./gradlew
- run: ./gradlew assemble
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload APK to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: '**/*.apk'
asset_name: '*.apk'
asset_content_type: application/vnd.android.package-archive
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ fabric.properties
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
Expand Down
37 changes: 34 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import com.android.build.gradle.internal.api.ApkVariantOutputImpl
import org.gradle.kotlin.dsl.support.uppercaseFirstChar



plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
Expand All @@ -6,17 +11,43 @@ plugins {
android {
namespace = "sh.unlimi.x2vx"
compileSdk = 34
val applicationName = "sh.unlimi.x2vx"
val versionMajor = 1
val versionMinor = 0
val versionPatch = 2

defaultConfig {
applicationId = "sh.unlimi.x2vx"
minSdk = 29
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = versionMinor * 10000 + versionMinor * 100 + versionPatch
versionName = "${versionMajor}.${versionMinor}.${versionPatch}"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

applicationVariants.configureEach {
// rename the output APK file
outputs.configureEach {
(this as? ApkVariantOutputImpl)?.outputFileName =
"${applicationName}_${versionName}(${versionCode})_${buildType.name}.apk"
}

// rename the output AAB file
tasks.named(
"sign${flavorName.uppercaseFirstChar()}${buildType.name.uppercaseFirstChar()}Bundle",
com.android.build.gradle.internal.tasks.FinalizeBundleTask::class.java
) {
val file = finalBundleFile.asFile.get()
val finalFile =
File(
file.parentFile,
"${rootProject.name}_$versionName($versionCode)_${buildType.name}.aab"
)
finalBundleFile.set(finalFile)
}
}

buildTypes {
release {
isMinifyEnabled = false
Expand All @@ -40,7 +71,7 @@ dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation("androidx.core:core-splashscreen:1.0.1")
implementation(libs.androidx.core.splashscreen)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
Expand Down
Binary file not shown.
Binary file not shown.
37 changes: 37 additions & 0 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "sh.unlimi.x2vx",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 2,
"versionName": "1.0.2",
"outputFile": "sh.unlimi.x2vx_1.0.2(2)_release.apk"
}
],
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/sh.unlimi.x2vx_1.0.2(2)_release.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/sh.unlimi.x2vx_1.0.2(2)_release.dm"
]
}
],
"minSdkVersionForDexing": 29
}
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.X2vx"
tools:targetApi="31">
Expand Down
Binary file modified app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/play_store_512.png
Binary file not shown.
30 changes: 15 additions & 15 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#1DA1F2">
<group android:scaleX="0.4466"
android:scaleY="0.4466"
android:translateX="6.6408"
android:translateY="6.6408">
<path
android:fillColor="@android:color/white"
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</group>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#1DA1F2">
<group android:scaleX="0.58"
android:scaleY="0.58"
android:translateX="5.04"
android:translateY="5.04">
<path
android:fillColor="@android:color/white"
android:pathData="M18.3,5.71c-0.39,-0.39 -1.02,-0.39 -1.41,0L12,10.59 7.11,5.7c-0.39,-0.39 -1.02,-0.39 -1.41,0 -0.39,0.39 -0.39,1.02 0,1.41L10.59,12 5.7,16.89c-0.39,0.39 -0.39,1.02 0,1.41 0.39,0.39 1.02,0.39 1.41,0L12,13.41l4.89,4.89c0.39,0.39 1.02,0.39 1.41,0 0.39,-0.39 0.39,-1.02 0,-1.41L13.41,12l4.89,-4.89c0.38,-0.38 0.38,-1.02 0,-1.4z"/>
</group>
</vector>
9 changes: 5 additions & 4 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#000000</color>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#000000</color>
</resources>
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
material = "1.10.0"
splashscreen = "1.0.1"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "splashscreen" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }

[plugins]
Expand Down
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Empty file modified gradlew
100644 → 100755
Empty file.

0 comments on commit b0aa5fb

Please sign in to comment.