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

Commit

Permalink
v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
s1204IT committed Jan 5, 2025
1 parent 3f55d4e commit 7ccf575
Show file tree
Hide file tree
Showing 17 changed files with 168 additions and 176 deletions.
73 changes: 8 additions & 65 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,77 +21,32 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: 21

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

- name: Set environments
run: |
{
echo "version=v$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")"
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
with:
subject-path: ${{ env.repo }}-${{ env.version }}*.a*

- name: Upload APK
- name: Upload
uses: actions/upload-artifact@v4
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ build/
# Android Studio Signing APK
/app/debug/
/app/release/
# VS Code
/.vscode/
31 changes: 13 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### 対応機種
- チャレンジパッド3
※02.04.000以降
※02.00.000以降
- チャレンジパッドNeo
- チャレンジパッドNext

Expand Down Expand Up @@ -32,30 +32,25 @@
CT3 のみ存在します。

- **getInt** : (String), (int)
**bc** から始まる変数の値を返します
特定変数の値を返します
CT3 には存在しません。

- **getLcdSize** : (void), (Point)
`getInitialDisplaySize()` を呼び出します。
CT3 のみ存在します。

- **getString** : (String), (String)
**bc** から始まる変数の値を返します
特定変数の値を返します
CT3 では **`bc:mac_address`** のみ取得できます。

- **putInt** : (String, int), (boolean)
**bc** から始まる変数の値を変更します
特定変数の値を変更します
CT3 には存在しません。

- **putString** : (String, String), (boolean)
1つ目の引数に、
- bc:**touchpanel:fw_update**
- bc:**digitizer:fw_update**
- bc:**touchpanel:nvt:fw_update**

1つ目の引数に特定変数を入れ、
2つ目の引数に、アップデートファイルのパスを入力します。
bc:**touchpanel:fts:fw_update** は無視されています。
上手く動作していないので推測です。
bc:**touchpanel:fts:fw_update** は無視されています。
CT3 及び CTX には存在しません。

- **setDchaState** : (int), (void)
Expand All @@ -73,10 +68,10 @@
これらの変数は CTZ を参照しており、 CT3/CTX では使えない可能性があります。

- bc:**compatscreen**
画面の密度と比率を変更できます。
**0**: h(240)dpi 1920x1200
**1**: m(160)dpi 1024x768
**2**: m(160)dpi 1200x800
画面の密度と比率を変更できます。
- **0**: h(240)dpi 1920x1200
- **1**: m(160)dpi 1024x768
- **2**: m(160)dpi 1200x800
- bc:**digitizer:fw_update**
- bc:**digitizer:fw_version**
- bc:**touchpanel\:palmreject:size**
Expand All @@ -93,9 +88,9 @@
- bc:**nightcolor:min**
読書灯の輝度の最小値 : `2596`
- bc:**nightmode:active**
読書灯の状態
**0** : 無効
**1** : 有効
読書灯の状態
- **0** : 無効
- **1** : 有効
- bc:**touchpanel\:palmreject:size**
- bc:**pen:battery**
- bc:**touchpanel\:nvt:fw_update**
Expand Down
42 changes: 17 additions & 25 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.touch.test'
compileSdk 34
namespace = 'me.s1204.benesse.touch.test'
compileSdk = 35

defaultConfig {
minSdk 24
targetSdk 34
versionCode 7
versionName "2.0.1"
minSdk = 24
targetSdk = 35
versionCode = 8
versionName = "2.1.0"
proguardFiles += 'proguard-rules.pro'
multiDexEnabled = false
}

signingConfigs {
Expand All @@ -21,34 +22,25 @@ 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 {
debug {
minifyEnabled false
multiDexEnabled false
signingConfig signingConfigs.android
configureEach {
signingConfig = signingConfigs.android
}
release {
minifyEnabled true
shrinkResources true
multiDexEnabled false
signingConfig signingConfigs.android
if (file('release.jks').exists()) {
signingConfig signingConfigs.release
}
minifyEnabled = true
shrinkResources = true
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}

lintOptions {
ignore 'Deprecated', 'DiscouragedApi', 'ProtectedPermissions'
}
}

Expand Down
1 change: 0 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-ignorewarnings
-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile
8 changes: 4 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:sharedUserId="me.s1204.benesse.shared">

<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />

<application
android:icon="@mipmap/ic_launcher"
android:label="BenesseExtension Tester">
<activity
android:name=".Tester"
android:exported="true">
android:exported="true"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
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 7ccf575

Please sign in to comment.