Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
s1204IT committed Jan 6, 2025
1 parent 391b22f commit 96411d4
Show file tree
Hide file tree
Showing 26 changed files with 1,569 additions and 192 deletions.
69 changes: 6 additions & 63 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,7 @@ 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:
Expand All @@ -33,60 +21,24 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Set environments
run: |
{
echo "version=v$(grep -oP 'versionName \"\K[^\"]+' app/build.gradle)"
echo "version=v$(grep versionName app/build.gradle | awk -F\" '{print $2}')"
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]
if: github.event.inputs.release == 'true'
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!\nTo release, you need to set up a signing key!\n"
echo "STORE_FILE: A Base64 encoded string of the signing key in JKS format"
echo "STORE_PASSWORD: Key store password"
echo "KEY_ALIAS: Key alias"
echo "KEY_PASSWORD: Key password"
echo ""
exit 1
fi
if [ "${{ steps.check-tag.outputs.exists }}" == "true" ]; then
echo -e "\nERROR!\nThe same tag already exists!\n"
echo "Please change versionName in build.gradle"
echo ""
exit 1
fi
- name: Build with Gradle
- name: Build
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 assembleRelease bundleRelease
cp -f app/build/outputs/apk/release/app-release.apk ${{ env.repo }}-${{ env.version }}.apk
cp -f app/build/outputs/bundle/release/app-release.aab ${{ env.repo }}-${{ env.version }}.aab
else
./gradlew assembleDebug bundleDebug
cp -f app/build/outputs/apk/debug/app-debug.apk ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.apk
cp -f app/build/outputs/bundle/debug/app-debug.aab ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.aab
fi
./gradlew assembleDebug bundleDebug --no-daemon --stacktrace --warning-mode=all
cp -f app/build/outputs/apk/debug/app-debug.apk ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.apk
cp -f app/build/outputs/bundle/debug/app-debug.aab ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.aab
- name: Attest
uses: actions/attest-build-provenance@v1
Expand All @@ -98,12 +50,3 @@ jobs:
with:
name: ${{ env.repo }}(${{ env.version }}@${{ env.commit }})
path: ${{ env.repo }}-${{ env.version }}*.a*

- name: Release
uses: softprops/action-gh-release@v2
if: github.event.inputs.release == 'true'
with:
tag_name: ${{ env.version }}
draft: true
prerelease: false
files: ${{ env.repo }}-${{ env.version }}.apk
35 changes: 14 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ plugins {
}

android {
namespace 'me.s1204.benesse.dcha.test'
compileSdk 35
namespace = 'me.s1204.benesse.dcha.test'
compileSdk = 35

defaultConfig {
minSdk 22
targetSdk 35
versionCode 8
versionName "1.3.2"
minSdk = 22
targetSdk = 35
versionCode = 9
versionName = "1.4.0"
proguardFiles += 'proguard-rules.pro'
multiDexEnabled = false
}

signingConfigs {
Expand All @@ -21,24 +22,15 @@ 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')
}
}

buildTypes {
configureEach {
signingConfig signingConfigs.android
signingConfig = signingConfigs.android
}
release {
minifyEnabled true
shrinkResources true
if (file('release.jks').exists()) {
signingConfig signingConfigs.release
}
minifyEnabled = true
shrinkResources = true
}
}

Expand All @@ -48,14 +40,15 @@ android {
}

buildFeatures {
buildConfig false
compose false
buildConfig = false
}

lintOptions {
ignore 'HardcodedText', 'InefficientWeight', 'Autofill', 'TextFields'
abortOnError = false
ignore 'HardcodedText', 'InefficientWeight', 'Autofill', 'TextFields', 'Deprecated', 'TooManyViews'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
Binary file modified app/libs/DchaService.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
-keep class jp.co.benesse.dcha.dchaservice.IDchaService
-keep class jp.co.benesse.dcha.dchautilservice.IDchaUtilService
-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</activity>

Expand Down
36 changes: 36 additions & 0 deletions app/src/main/java/androidx/annotation/NonNull.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package androidx.annotation;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PACKAGE;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.CLASS;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Denotes that a parameter, field or method return value can never be null.
* <p>
* This is a marker annotation and it has no specific attributes.
*/
@Documented
@Retention(CLASS)
@Target({METHOD, PARAMETER, FIELD, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE})
public @interface NonNull {
}
Loading

0 comments on commit 96411d4

Please sign in to comment.