Skip to content

Commit abf533a

Browse files
Merge pull request #14 from Live2D/develop
Update to Cubism 5 SDK for Java R3
2 parents 917d01c + d2cb4f0 commit abf533a

File tree

9 files changed

+72
-39
lines changed

9 files changed

+72
-39
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77

8+
## [5-r.3] - 2025-02-18
9+
10+
### Fixed
11+
12+
* Fix a bug where the application crashes when tapping the model repeatedly.
13+
14+
### Changed
15+
16+
* Change the compile and target SDK version of Android OS to 15.0 (API 35).
17+
* Upgrade the version of Android Gradle Plugin from 8.1.1 to 8.6.1.
18+
* Upgrade the version of Gradle from 8.2 to 8.7.
19+
* Change the minimum version of Android Studio to Ladybug(2024.2.1).
20+
21+
822
## [5-r.2] - 2024-11-07
923

1024
### Added
@@ -162,6 +176,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
162176
* New released!
163177

164178

179+
[5-r.3]: https://github.com/Live2D/CubismJavaSamples/compare/5-r.2...5-r.3
165180
[5-r.2]: https://github.com/Live2D/CubismJavaSamples/compare/5-r.1...5-r.2
166181
[5-r.1]: https://github.com/Live2D/CubismJavaSamples/compare/5-r.1-beta.3...5-r.1
167182
[5-r.1-beta.3]: https://github.com/Live2D/CubismJavaSamples/compare/5-r.1-beta.2...5-r.1-beta.3

README.ja.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ Core : [CHANGELOG.md](Core/CHANGELOG.md)
7272
| 開発ツール | バージョン |
7373
|----------------|------------------|
7474
| Android Studio | Ladybug 2024.2.1 Patch 2 |
75-
| Gradle | 8.2 |
75+
| Gradle | 8.7 |
76+
| Android Gradle Plugin | 8.6.1 |
7677
| Gradle JDK | 17.0.12 |
77-
| Android SDK | 34.0.0 |
78+
| Android SDK | 35.0.0 |
7879

7980
## 動作確認環境
8081

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ Core : [CHANGELOG.md](Core/CHANGELOG.md)
7272
| Development Tools | Version |
7373
|-------------------|--|
7474
| Android Studio | Ladybug 2024.2.1 Patch 2 |
75-
| Gradle | 8.2 |
75+
| Gradle | 8.7 |
76+
| Android Gradle Plugin | 8.6.1 |
7677
| Gradle JDK | 17.0.12 |
77-
| Android SDK | 34.0.0 |
78+
| Android SDK | 35.0.0 |
7879

7980
## Operation environment
8081

Sample/src/full/java/com/live2d/demo/full/MainActivity.java

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,29 @@ protected void onDestroy() {
9696
}
9797

9898
@Override
99-
public boolean onTouchEvent(MotionEvent event) {
100-
float pointX = event.getX();
101-
float pointY = event.getY();
102-
103-
switch (event.getAction()) {
104-
case MotionEvent.ACTION_DOWN:
105-
LAppDelegate.getInstance().onTouchBegan(pointX, pointY);
106-
break;
107-
case MotionEvent.ACTION_UP:
108-
LAppDelegate.getInstance().onTouchEnd(pointX, pointY);
109-
break;
110-
case MotionEvent.ACTION_MOVE:
111-
LAppDelegate.getInstance().onTouchMoved(pointX, pointY);
112-
break;
113-
}
99+
public boolean onTouchEvent(final MotionEvent event) {
100+
final float pointX = event.getX();
101+
final float pointY = event.getY();
102+
103+
// GLSurfaceViewのイベント処理キューにタッチイベントを追加する。
104+
glSurfaceView.queueEvent(
105+
new Runnable() {
106+
@Override
107+
public void run() {
108+
switch (event.getAction()) {
109+
case MotionEvent.ACTION_DOWN:
110+
LAppDelegate.getInstance().onTouchBegan(pointX, pointY);
111+
break;
112+
case MotionEvent.ACTION_UP:
113+
LAppDelegate.getInstance().onTouchEnd(pointX, pointY);
114+
break;
115+
case MotionEvent.ACTION_MOVE:
116+
LAppDelegate.getInstance().onTouchMoved(pointX, pointY);
117+
break;
118+
}
119+
}
120+
}
121+
);
114122
return super.onTouchEvent(event);
115123
}
116124

Sample/src/minimum/java/com.live2d.demo.minimum/MainActivityMinimum.java

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,29 @@ protected void onDestroy() {
6464
}
6565

6666
@Override
67-
public boolean onTouchEvent(MotionEvent event) {
68-
float pointX = event.getX();
69-
float pointY = event.getY();
70-
71-
switch (event.getAction()) {
72-
case MotionEvent.ACTION_DOWN:
73-
LAppMinimumDelegate.getInstance().onTouchBegan(pointX, pointY);
74-
break;
75-
case MotionEvent.ACTION_UP:
76-
LAppMinimumDelegate.getInstance().onTouchEnd(pointX, pointY);
77-
break;
78-
case MotionEvent.ACTION_MOVE:
79-
LAppMinimumDelegate.getInstance().onTouchMoved(pointX, pointY);
80-
break;
81-
}
67+
public boolean onTouchEvent(final MotionEvent event) {
68+
final float pointX = event.getX();
69+
final float pointY = event.getY();
70+
71+
// GLSurfaceViewのイベント処理キューにタッチイベントを追加する。
72+
_glSurfaceView.queueEvent(
73+
new Runnable() {
74+
@Override
75+
public void run() {
76+
switch (event.getAction()) {
77+
case MotionEvent.ACTION_DOWN:
78+
LAppMinimumDelegate.getInstance().onTouchBegan(pointX, pointY);
79+
break;
80+
case MotionEvent.ACTION_UP:
81+
LAppMinimumDelegate.getInstance().onTouchEnd(pointX, pointY);
82+
break;
83+
case MotionEvent.ACTION_MOVE:
84+
LAppMinimumDelegate.getInstance().onTouchMoved(pointX, pointY);
85+
break;
86+
}
87+
}
88+
}
89+
);
8290
return super.onTouchEvent(event);
8391
}
8492
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:8.1.1'
8+
classpath 'com.android.tools.build:gradle:8.6.1'
99
// classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.8.2.0'
1010

1111
// NOTE: Do not place your application dependencies here; they belong

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ android.useAndroidX=true
1919
android.enableJetifier=true
2020
# Added later
2121
# Android SDK version that will be used as the compiled project
22-
PROP_COMPILE_SDK_VERSION=34
22+
PROP_COMPILE_SDK_VERSION=35
2323
# Android SDK version that will be used as the earliest version of android this application can run on
2424
PROP_MIN_SDK_VERSION=21
2525
# Android SDK version that will be used as the latest version of android this application has been tested on
26-
PROP_TARGET_SDK_VERSION=34
26+
PROP_TARGET_SDK_VERSION=35
2727
# List of CPU Archtexture to build that application with
2828
# Available architextures (arm64-v8a | x86)
2929
# To build for multiple architexture, use the `:` between them
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Jul 11 17:28:23 JST 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)