Skip to content

Commit

Permalink
Merge pull request #4 from s1204IT/master
Browse files Browse the repository at this point in the history
ビルドワークフローの追加&ファイルの最適化
  • Loading branch information
Chipppppppppp authored Jan 20, 2024
2 parents e4f28f8 + d7fcaf8 commit 0278e4f
Show file tree
Hide file tree
Showing 25 changed files with 373 additions and 308 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto eol=lf
*.bat text eol=crlf
*.png binary
*.webp binary
*.jar binary
*.jks binary
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 不具合の報告
description: バグや開発側が想定していない動作などの報告
labels: [bug]
title: "[Bug] タイトルを入力"
body:
- type: textarea
attributes:
label: 内容の詳細
placeholder: 具体的に記述してください
validations:
required: true
- type: textarea
attributes:
label: 再現する手順
placeholder: 可能な限り具体的に記述してください
validations:
required: true
- type: input
attributes:
label: モジュールのバージョン
placeholder: "1.0"
validations:
required: true
- type: input
attributes:
label: LINEアプリのバージョン
placeholder: 14.0.1
validations:
required: true
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 機能の提案
description: 新しい機能や改善点などの提案
labels: [enhancement]
title: "[Feature Request] タイトルを入力"
body:
- type: textarea
attributes:
label: 提案内容
placeholder: ここに提案を入力してください
validations:
required: true
100 changes: 100 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build

on:
push:
paths:
- '.github/workflows/build.yml'
- 'app/**'
- 'gradle/**'
- '*.gradle'
- '*.properties'
workflow_dispatch:
inputs:
release:
description: 'Release'
type: boolean
required: true
default: false

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: ${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Set environments
run: |
{
echo "version=v$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")"
echo "commit=$(echo ${{ github.sha }} | cut -c-7)"
echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})"
} >> $GITHUB_ENV
- name: Check tag exists
uses: mukunku/[email protected]
id: check-tag
with:
tag: "${{ env.version }}"

- name: Release check
if: github.event.inputs.release == 'true'
run: |
if [[ "${{ secrets.STORE_FILE }}" == "" ]]; then
echo -e "\nERROR!\n\nリリースするには、 署名鍵を設定する必要があります。\n\n"
echo "STORE_FILE: JKS形式の署名鍵をBase64でエンコードした文字列"
echo "STORE_PASSWORD: キーストアのパスワード"
echo "KEY_ALIAS: 署名のエイリアス"
echo "KEY_PASSWORD: 署名のパスワード"
exit 1
fi
if [[ "${{ steps.check-tag.outputs.exists }}" == "true" ]]; then
echo -e "\nERROR!\n\n既に同じタグが存在します。\n\n"
echo "build.gradle の versionName を変更してください"
exit 1
fi
- name: Build with Gradle
run: |
if [[ "${{ inputs.release }}" == "true" ]]; then
echo "${{ secrets.STORE_FILE }}" | base64 -d > app/release.jks
export STORE_PASSWORD="${{ secrets.STORE_PASSWORD }}"
export KEY_ALIAS="${{ secrets.KEY_ALIAS }}"
export KEY_PASSWORD="${{ secrets.KEY_PASSWORD }}"
./gradlew aR --no-daemon
else
./gradlew assemble --no-daemon
fi
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: ${{ env.repo }}(v${{ env.version }}@${{ env.commit }})
path: app/build/outputs/apk/**/app-*.apk

- name: Release
uses: softprops/action-gh-release@v1
if: github.event.inputs.release == 'true'
with:
tag_name: v${{ env.version }}
draft: true
prerelease: false
files: app/build/outputs/apk/release/app-release.apk
45 changes: 0 additions & 45 deletions .github/workflows/release.yml

This file was deleted.

24 changes: 10 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
*.iml
.gradle
# Gradle
/.gradle/
# Android SDK
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# IntelliJ
/.idea/
# Gradle Build
/app/build/
# Android Studio Signing APK
/app/debug/
/app/release/
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

20 changes: 0 additions & 20 deletions .idea/gradle.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/.gitignore

This file was deleted.

Binary file added app/android.jks
Binary file not shown.
38 changes: 25 additions & 13 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@ android {
compileSdk 33

defaultConfig {
applicationId "io.github.chipppppppppp.lime"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
}

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfigs {
android {
storeFile file('android.jks')
storePassword 'android'
keyAlias 'android'
keyPassword 'android'
}
release {
storeFile file('release.jks')
storePassword System.getenv('STORE_PASSWORD')
keyAlias System.getenv('KEY_ALIAS')
keyPassword System.getenv('KEY_PASSWORD')
}
}
signingConfigs {
debug {
Expand All @@ -27,29 +39,29 @@ android {
}
}
buildTypes {
debug {
minifyEnabled false
proguardFiles += 'proguard-rules.pro'
signingConfig signingConfigs.android
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (rootProject.file('release.keystore').exists()) {
signingConfig signingConfigs.release
proguardFiles += 'proguard-rules.pro'
if (file('release.jks').exists()) {
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.preference:preference:1.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'androidx.browser:browser:1.5.0'
compileOnly 'de.robv.android.xposed:api:82'
compileOnly 'de.robv.android.xposed:api:82:sources'
implementation 'androidx.browser:browser:1.5.0'
}
}
22 changes: 1 addition & 21 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep de.robv.android.xposed.**
Loading

0 comments on commit 0278e4f

Please sign in to comment.