Skip to content

Commit 7ccf575

Browse files
committed
v2.1.0
1 parent 3f55d4e commit 7ccf575

File tree

17 files changed

+168
-176
lines changed

17 files changed

+168
-176
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@ name: Build
22

33
on:
44
push:
5-
paths:
6-
- '.github/workflows/build.yml'
7-
- 'app/**'
8-
- 'gradle/**'
9-
- '*.gradle'
10-
- '*.properties'
115
workflow_dispatch:
12-
inputs:
13-
release:
14-
description: 'Release'
15-
type: boolean
16-
required: true
17-
default: false
186

197
jobs:
208
build:
@@ -33,77 +21,32 @@ jobs:
3321
uses: actions/setup-java@v4
3422
with:
3523
distribution: 'temurin'
36-
java-version: '17'
24+
java-version: 21
3725

3826
- name: Setup Gradle
39-
uses: gradle/actions/setup-gradle@v3
27+
uses: gradle/actions/setup-gradle@v4
4028

4129
- name: Set environments
4230
run: |
4331
{
44-
echo "version=v$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")"
32+
echo "version=v$(grep versionName app/build.gradle | awk -F\" '{print $2}')"
4533
echo "commit=$(echo ${{ github.sha }} | cut -c-7)"
4634
echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})"
4735
} >> $GITHUB_ENV
4836
49-
- name: Check tag exists
50-
uses: mukunku/tag-exists-action@v1.6.0
51-
if: github.event.inputs.release == 'true'
52-
id: check-tag
53-
with:
54-
tag: "${{ env.version }}"
55-
56-
- name: Release check
57-
if: github.event.inputs.release == 'true'
58-
run: |
59-
if [ "${{ secrets.STORE_FILE }}" == "" ]; then
60-
echo -e "\nERROR!\nTo release, you need to set up a signing key!\n"
61-
echo "STORE_FILE: A Base64 encoded string of the signing key in JKS format"
62-
echo "STORE_PASSWORD: Key store password"
63-
echo "KEY_ALIAS: Key alias"
64-
echo "KEY_PASSWORD: Key password"
65-
echo ""
66-
exit 1
67-
fi
68-
if [ "${{ steps.check-tag.outputs.exists }}" == "true" ]; then
69-
echo -e "\nERROR!\nThe same tag already exists!\n"
70-
echo "Please change versionName in build.gradle"
71-
echo ""
72-
exit 1
73-
fi
74-
75-
- name: Build with Gradle
37+
- name: Build
7638
run: |
77-
if [ "${{ inputs.release }}" == "true" ]; then
78-
echo "${{ secrets.STORE_FILE }}" | base64 -d > app/release.jks
79-
export STORE_PASSWORD="${{ secrets.STORE_PASSWORD }}"
80-
export KEY_ALIAS="${{ secrets.KEY_ALIAS }}"
81-
export KEY_PASSWORD="${{ secrets.KEY_PASSWORD }}"
82-
./gradlew assembleRelease bundleRelease
83-
cp -f app/build/outputs/apk/release/app-release.apk ${{ env.repo }}-${{ env.version }}.apk
84-
cp -f app/build/outputs/bundle/release/app-release.aab ${{ env.repo }}-${{ env.version }}.aab
85-
else
86-
./gradlew assembleDebug bundleDebug
87-
cp -f app/build/outputs/apk/debug/app-debug.apk ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.apk
88-
cp -f app/build/outputs/bundle/debug/app-debug.aab ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.aab
89-
fi
39+
./gradlew assembleDebug bundleDebug --no-daemon --stacktrace --warning-mode=all
40+
cp -f app/build/outputs/apk/debug/app-debug.apk ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.apk
41+
cp -f app/build/outputs/bundle/debug/app-debug.aab ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.aab
9042
9143
- name: Attest
9244
uses: actions/attest-build-provenance@v1
9345
with:
9446
subject-path: ${{ env.repo }}-${{ env.version }}*.a*
9547

96-
- name: Upload APK
48+
- name: Upload
9749
uses: actions/upload-artifact@v4
9850
with:
9951
name: ${{ env.repo }}(${{ env.version }}@${{ env.commit }})
10052
path: ${{ env.repo }}-${{ env.version }}*.a*
101-
102-
- name: Release
103-
uses: softprops/action-gh-release@v2
104-
if: github.event.inputs.release == 'true'
105-
with:
106-
tag_name: ${{ env.version }}
107-
draft: true
108-
prerelease: false
109-
files: ${{ env.repo }}-${{ env.version }}.apk

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ build/
99
# Android Studio Signing APK
1010
/app/debug/
1111
/app/release/
12+
# VS Code
13+
/.vscode/

README.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### 対応機種
66
- チャレンジパッド3
7-
※02.04.000以降
7+
※02.00.000以降
88
- チャレンジパッドNeo
99
- チャレンジパッドNext
1010

@@ -32,30 +32,25 @@
3232
CT3 のみ存在します。
3333

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

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

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

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

5050
- **putString** : (String, String), (boolean)
51-
1つ目の引数に、
52-
- bc:**touchpanel:fw_update**
53-
- bc:**digitizer:fw_update**
54-
- bc:**touchpanel:nvt:fw_update**
55-
51+
1つ目の引数に特定変数を入れ、
5652
2つ目の引数に、アップデートファイルのパスを入力します。
57-
bc:**touchpanel:fts:fw_update** は無視されています。
58-
上手く動作していないので推測です。
53+
bc:**touchpanel:fts:fw_update** は無視されています。
5954
CT3 及び CTX には存在しません。
6055

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

7570
- bc:**compatscreen**
76-
画面の密度と比率を変更できます。
77-
**0**: h(240)dpi 1920x1200
78-
**1**: m(160)dpi 1024x768
79-
**2**: m(160)dpi 1200x800
71+
画面の密度と比率を変更できます。
72+
- **0**: h(240)dpi 1920x1200
73+
- **1**: m(160)dpi 1024x768
74+
- **2**: m(160)dpi 1200x800
8075
- bc:**digitizer:fw_update**
8176
- bc:**digitizer:fw_version**
8277
- bc:**touchpanel\:palmreject:size**
@@ -93,9 +88,9 @@
9388
- bc:**nightcolor:min**
9489
読書灯の輝度の最小値 : `2596`
9590
- bc:**nightmode:active**
96-
読書灯の状態
97-
**0** : 無効
98-
**1** : 有効
91+
読書灯の状態
92+
- **0** : 無効
93+
- **1** : 有効
9994
- bc:**touchpanel\:palmreject:size**
10095
- bc:**pen:battery**
10196
- bc:**touchpanel\:nvt:fw_update**

app/build.gradle

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ plugins {
33
}
44

55
android {
6-
namespace 'me.s1204.benesse.touch.test'
7-
compileSdk 34
6+
namespace = 'me.s1204.benesse.touch.test'
7+
compileSdk = 35
88

99
defaultConfig {
10-
minSdk 24
11-
targetSdk 34
12-
versionCode 7
13-
versionName "2.0.1"
10+
minSdk = 24
11+
targetSdk = 35
12+
versionCode = 8
13+
versionName = "2.1.0"
1414
proguardFiles += 'proguard-rules.pro'
15+
multiDexEnabled = false
1516
}
1617

1718
signingConfigs {
@@ -21,34 +22,25 @@ android {
2122
keyAlias 'android'
2223
keyPassword 'android'
2324
}
24-
release {
25-
storeFile file('release.jks')
26-
storePassword System.getenv('STORE_PASSWORD')
27-
keyAlias System.getenv('KEY_ALIAS')
28-
keyPassword System.getenv('KEY_PASSWORD')
29-
}
3025
}
3126

3227
buildTypes {
33-
debug {
34-
minifyEnabled false
35-
multiDexEnabled false
36-
signingConfig signingConfigs.android
28+
configureEach {
29+
signingConfig = signingConfigs.android
3730
}
3831
release {
39-
minifyEnabled true
40-
shrinkResources true
41-
multiDexEnabled false
42-
signingConfig signingConfigs.android
43-
if (file('release.jks').exists()) {
44-
signingConfig signingConfigs.release
45-
}
32+
minifyEnabled = true
33+
shrinkResources = true
4634
}
4735
}
4836

4937
compileOptions {
50-
sourceCompatibility JavaVersion.VERSION_17
51-
targetCompatibility JavaVersion.VERSION_17
38+
sourceCompatibility JavaVersion.VERSION_21
39+
targetCompatibility JavaVersion.VERSION_21
40+
}
41+
42+
lintOptions {
43+
ignore 'Deprecated', 'DiscouragedApi', 'ProtectedPermissions'
5244
}
5345
}
5446

app/proguard-rules.pro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
-ignorewarnings
21
-keepattributes LineNumberTable,SourceFile
32
-renamesourcefileattribute SourceFile

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
43
android:sharedUserId="me.s1204.benesse.shared">
54

6-
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"
7-
tools:ignore="ProtectedPermissions" />
5+
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
86

97
<application
108
android:icon="@mipmap/ic_launcher"
119
android:label="BenesseExtension Tester">
1210
<activity
1311
android:name=".Tester"
14-
android:exported="true">
12+
android:exported="true"
13+
android:screenOrientation="landscape">
1514
<intent-filter>
1615
<action android:name="android.intent.action.MAIN" />
1716
<category android:name="android.intent.category.DEFAULT" />
1817
<category android:name="android.intent.category.LAUNCHER" />
1918
</intent-filter>
2019
</activity>
20+
2121
</application>
2222

2323
</manifest>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (C) 2013 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package androidx.annotation;
17+
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
18+
import static java.lang.annotation.ElementType.FIELD;
19+
import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
20+
import static java.lang.annotation.ElementType.METHOD;
21+
import static java.lang.annotation.ElementType.PACKAGE;
22+
import static java.lang.annotation.ElementType.PARAMETER;
23+
import static java.lang.annotation.RetentionPolicy.CLASS;
24+
import java.lang.annotation.Documented;
25+
import java.lang.annotation.Retention;
26+
import java.lang.annotation.Target;
27+
/**
28+
* Denotes that a parameter, field or method return value can never be null.
29+
* <p>
30+
* This is a marker annotation and it has no specific attributes.
31+
*/
32+
@Documented
33+
@Retention(CLASS)
34+
@Target({METHOD, PARAMETER, FIELD, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE})
35+
public @interface NonNull {
36+
}

0 commit comments

Comments
 (0)