Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Gradle Plugin を 8.5.0 にアップグレード #78

Merged
merged 3 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@

## develop

- [UPDATE] Android Gradle Plugin (AGP) を 8.5.0 にアップグレードする
- Android Studion の AGP Upgrade Assistant を利用してアップグレードされた内容
- `com.android.tools.build:gradle` を 8.5.0 に上げる
- ビルドに利用される Gradle を 8.7 に上げる
- Android マニフェストからビルドファイルにパッケージを移動
- Android マニフェストに定義されていた package を削除
- ビルドファイルに namespace を追加
- ビルドファイルの dependencies の transitive をコメントアウト
- AGP 8.5.0 対応で発生したビルドスクリプトのエラーを手動で修正した内容
- AGP 8.0 から buildConfig がデフォルト false になったため、true に設定する
- @zztkm

## sora-andoroid-sdk-2024.2.0

- [UPDATE] システム条件を更新する
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.5.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Jan 20 16:14:02 JST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
9 changes: 9 additions & 0 deletions samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ android {

buildFeatures {
compose true

// AGP 8.0 からデフォルトで false になった
// このオプションが true でないと、defaultConfig に含まれている
// buildConfigField オプションが無効になってしまうため、true に設定する
// 参考: https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes#default-changes
buildConfig true
}

composeOptions {
Expand All @@ -69,6 +75,9 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
// AGP 8.0 からモジュールレベルの build script 内に namespace が必要になった
// 参考: https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes#namespace-dsl
namespace 'jp.shiguredo.sora.sample'
}

configurations {
Expand Down
3 changes: 1 addition & 2 deletions samples/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="jp.shiguredo.sora.sample">
xmlns:tools="http://schemas.android.com/tools">

<uses-sdk tools:overrideLibrary="android.support.v17.leanback" />

Expand Down
5 changes: 4 additions & 1 deletion webrtc-video-effector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// AGP 8.0 からモジュールレベルの build script 内に namespace が必要になった
// 参考: https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes#namespace-dsl
namespace 'jp.shiguredo.webrtc.video.effector'
}

ktlint {
Expand All @@ -62,7 +65,7 @@ dependencies {
} else {
// external dependency
api("com.github.shiguredo:sora-android-sdk:${sora_android_sdk_version}") {
transitive = true
// transitive = true
}
}

Expand Down
3 changes: 1 addition & 2 deletions webrtc-video-effector/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="jp.shiguredo.webrtc.video.effector">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>