Skip to content
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
6 changes: 5 additions & 1 deletion agdk/adpf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The sample:

## Prerequisites

Before building in Android Studio 2024.3.1 Patch 1 (Meerkat) the following prerequisites must be
Before building in Android Studio 2026.1.1 Patch 1 (Quail 1) or higher the following prerequisites must be
performed:

## Requirements
Expand Down Expand Up @@ -57,6 +57,10 @@ https://developer.android.com/reference/android/os/PowerManager

https://developer.android.com/ndk/reference/group/thermal

## Version history

1.2.3 - Updated to current AGDK/NDK/AGP versions, 16KB page compatible fix

## License

Copyright 2022 The Android Open Source Project
Expand Down
29 changes: 15 additions & 14 deletions agdk/adpf/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 36
ndkVersion '27.2.12479018'
compileSdkVersion 37
ndkVersion '29.0.14206865'

defaultConfig {
applicationId 'com.android.example.games.adpf'
minSdkVersion 24
targetSdkVersion 36
versionCode 5
versionName '1.2.2'
targetSdkVersion 37
versionCode 6
versionName '1.2.3'
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_shared',
Expand All @@ -36,7 +36,7 @@ android {
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
}
}
Expand All @@ -55,14 +55,15 @@ android {
}

dependencies {
implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"
implementation "androidx.lifecycle:lifecycle-livedata:2.2.0"
implementation "androidx.lifecycle:lifecycle-runtime:2.2.0"
implementation "androidx.core:core:1.5.0"
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation 'androidx.fragment:fragment:1.2.5'
implementation "androidx.games:games-activity:3.0.5"
implementation "androidx.games:games-frame-pacing:2.1.2"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel:2.10.0"
implementation "androidx.lifecycle:lifecycle-livedata:2.10.0"
implementation "androidx.lifecycle:lifecycle-runtime:2.10.0"
implementation "androidx.core:core:1.19.0"
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
implementation 'androidx.fragment:fragment:1.8.9'
implementation "androidx.games:games-activity:4.4.2"
implementation "androidx.games:games-frame-pacing:2.1.3"

// Example of using local .aar files in libs/ directory.
// Comment out the androidx.games implementation lines if
Expand Down
60 changes: 35 additions & 25 deletions agdk/adpf/app/src/main/cpp/demo_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,31 +328,41 @@ void DemoScene::RenderPanel() {
ImPlot::SetupAxisLimits(ImAxis_X1, t - history, t, ImGuiCond_Always);
ImPlot::SetupAxisLimits(ImAxis_Y1, -10000, 10000);

ImPlot::SetNextFillStyle(IMPLOT_AUTO_COL, 0.5f);
ImPlot::PlotShaded("Pow drain", &graph_buffer_.Data[0].x,
&graph_buffer_.Data[0].y, graph_buffer_.Data.size(),
-INFINITY, 0, graph_buffer_.Offset, 2 * sizeof(float));

ImPlot::PlotLine("Forecast x1", &graph_buffer_forecast1_.Data[0].x,
&graph_buffer_forecast1_.Data[0].y,
graph_buffer_forecast1_.Data.size(), 0,
graph_buffer_forecast1_.Offset, 2 * sizeof(float));
ImPlot::PlotLine("x10", &graph_buffer_forecast2_.Data[0].x,
&graph_buffer_forecast2_.Data[0].y,
graph_buffer_forecast2_.Data.size(), 0,
graph_buffer_forecast2_.Offset, 2 * sizeof(float));
ImPlot::PlotLine("x100", &graph_buffer_forecast3_.Data[0].x,
&graph_buffer_forecast3_.Data[0].y,
graph_buffer_forecast3_.Data.size(), 0,
graph_buffer_forecast3_.Offset, 2 * sizeof(float));
ImPlot::PlotLine("ADPF", &graph_buffer_power1_.Data[0].x,
&graph_buffer_power1_.Data[0].y,
graph_buffer_power1_.Data.size(), 0,
graph_buffer_power1_.Offset, 2 * sizeof(float));
ImPlot::PlotLine("NOADPF", &graph_buffer_power2_.Data[0].x,
&graph_buffer_power2_.Data[0].y,
graph_buffer_power2_.Data.size(), 0,
graph_buffer_power2_.Offset, 2 * sizeof(float));
auto get_x = [](auto& buf) { return buf.Data.empty() ? nullptr : &buf.Data[0].x; };
auto get_y = [](auto& buf) { return buf.Data.empty() ? nullptr : &buf.Data[0].y; };

ImPlot::PlotShaded("Pow drain", get_x(graph_buffer_),
get_y(graph_buffer_), graph_buffer_.Data.size(),
-INFINITY,
ImPlotSpec(ImPlotProp_FillAlpha, 0.5f,
ImPlotProp_Offset, graph_buffer_.Offset,
ImPlotProp_Stride, (int)(2 * sizeof(float))));

ImPlot::PlotLine("Forecast x1", get_x(graph_buffer_forecast1_),
get_y(graph_buffer_forecast1_),
graph_buffer_forecast1_.Data.size(),
ImPlotSpec(ImPlotProp_Offset, graph_buffer_forecast1_.Offset,
ImPlotProp_Stride, (int)(2 * sizeof(float))));
ImPlot::PlotLine("x10", get_x(graph_buffer_forecast2_),
get_y(graph_buffer_forecast2_),
graph_buffer_forecast2_.Data.size(),
ImPlotSpec(ImPlotProp_Offset, graph_buffer_forecast2_.Offset,
ImPlotProp_Stride, (int)(2 * sizeof(float))));
ImPlot::PlotLine("x100", get_x(graph_buffer_forecast3_),
get_y(graph_buffer_forecast3_),
graph_buffer_forecast3_.Data.size(),
ImPlotSpec(ImPlotProp_Offset, graph_buffer_forecast3_.Offset,
ImPlotProp_Stride, (int)(2 * sizeof(float))));
ImPlot::PlotLine("ADPF", get_x(graph_buffer_power1_),
get_y(graph_buffer_power1_),
graph_buffer_power1_.Data.size(),
ImPlotSpec(ImPlotProp_Offset, graph_buffer_power1_.Offset,
ImPlotProp_Stride, (int)(2 * sizeof(float))));
ImPlot::PlotLine("NOADPF", get_x(graph_buffer_power2_),
get_y(graph_buffer_power2_),
graph_buffer_power2_.Data.size(),
ImPlotSpec(ImPlotProp_Offset, graph_buffer_power2_.Offset,
ImPlotProp_Stride, (int)(2 * sizeof(float))));

ImPlot::EndPlot();
}
Expand Down
2 changes: 1 addition & 1 deletion agdk/adpf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.9.1'
classpath 'com.android.tools.build:gradle:9.2.1'
}
}

Expand Down
6 changes: 2 additions & 4 deletions agdk/adpf/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Wed Nov 18 14:49:00 GMT 2020
android.enableJetifier=true
android.useAndroidX=true

android.prefabVersion=2.0.0
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
2 changes: 1 addition & 1 deletion agdk/adpf/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 4 additions & 0 deletions agdk/adpf/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.10.0'
}

/*
* Copyright 2021 The Android Open Source Project
*
Expand Down
1 change: 0 additions & 1 deletion agdk/agdktunnel/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ GameSDKPath=../..
# Set to true to delivery optimized compressed assets using the Play Asset Delivery API
PADEnabled=false
android.nonTransitiveRClass=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
8 changes: 6 additions & 2 deletions agdk/game_controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ such as vibration

## Prerequisites

Before building in Android Studio 2024.3.1 Patch 1 (Meerkat) or higher the following prerequisites
Before building in Android Studio 2026.1.1 Patch 1 (Quail 1) or higher the following prerequisites
must be performed:

### ImGui
Expand All @@ -22,9 +22,13 @@ must be performed:

## Building

Open the `game_controller` directory in Android Studio 2021.2 or higher. You can
Open the `game_controller` directory in Android Studio 2026.1.1 Patch 1 (Quail 1) or higher. You can
then build and run the samples from Android Studio.

## Version history

1.1.4 - Updated to current AGDK/NDK/AGP versions, 16KB page compatible fix

## License

Copyright 2021 The Android Open Source Project
Expand Down
27 changes: 14 additions & 13 deletions agdk/game_controller/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 36
ndkVersion '27.2.12479018'
compileSdkVersion 37
ndkVersion '29.0.14206865'

defaultConfig {
applicationId 'com.google.android.games.paddleboat.gamecontrollersample'
minSdkVersion 24
targetSdkVersion 36
versionCode 5
versionName '1.1.3'
targetSdkVersion 37
versionCode 6
versionName '1.1.4'
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_shared',
Expand All @@ -36,7 +36,7 @@ android {
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
}
}
Expand All @@ -55,13 +55,14 @@ android {
}

dependencies {
implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"
implementation "androidx.lifecycle:lifecycle-livedata:2.2.0"
implementation "androidx.lifecycle:lifecycle-runtime:2.2.0"
implementation "androidx.core:core:1.5.0"
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation 'androidx.fragment:fragment:1.2.5'
implementation "androidx.games:games-activity:3.0.5"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel:2.10.0"
implementation "androidx.lifecycle:lifecycle-livedata:2.10.0"
implementation "androidx.lifecycle:lifecycle-runtime:2.10.0"
implementation "androidx.core:core:1.19.0"
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
implementation 'androidx.fragment:fragment:1.8.9'
implementation "androidx.games:games-activity:4.4.2"
implementation "androidx.games:games-controller:2.0.2"
implementation "com.android.ndk.thirdparty:libpng:1.6.37-alpha-1"

Expand Down
2 changes: 1 addition & 1 deletion agdk/game_controller/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.9.1'
classpath 'com.android.tools.build:gradle:9.2.1'
}
}

Expand Down
6 changes: 2 additions & 4 deletions agdk/game_controller/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Wed Nov 18 14:49:00 GMT 2020
android.enableJetifier=true
android.useAndroidX=true

android.prefabVersion=2.0.0
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 4 additions & 0 deletions agdk/game_controller/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.10.0'
}

/*
* Copyright 2021 The Android Open Source Project
*
Expand Down
8 changes: 6 additions & 2 deletions agdk/game_mode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Note that this sample is just demonstrating the easiest and most distinguishable

## Prerequisites

Before building in Android Studio 2024.3.1 Patch 1 (Meerkat) or higher, the following prerequisites must be met:
Before building in Android Studio 2026.1.1 Patch 1 (Quail 1) or higher, the following prerequisites must be met:

### Requirements

Expand All @@ -31,7 +31,7 @@ This sample utilizes 3rd party libraries such as Dear Imgui and Bullet physics.

## Building

Once the prerequisites are complete, open the folder in Android Studio 2021.2 or higher. You can then build and run the sample from Android Studio
Once the prerequisites are complete, open the folder in Android Studio 2026.1.1 Patch 1 (Quail 1) or higher. You can then build and run the sample from Android Studio

## Running

Expand All @@ -53,6 +53,10 @@ https://developer.android.com/games/gamemode/gamemode-api

https://developer.android.com/reference/android/app/GameManager

## Version history

1.2.3 - Updated to current AGDK/NDK/AGP versions, 16KB page compatible fix

## License

Copyright 2022 The Android Open Source Project
Expand Down
29 changes: 15 additions & 14 deletions agdk/game_mode/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 36
ndkVersion '27.2.12479018'
compileSdkVersion 37
ndkVersion '29.0.14206865'

defaultConfig {
applicationId 'com.android.example.games.game_mode_sample'
minSdkVersion 24
targetSdkVersion 36
versionCode 3
versionName '1.2.2'
targetSdkVersion 37
versionCode 4
versionName '1.2.3'
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_shared',
Expand All @@ -36,7 +36,7 @@ android {
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
}
}
Expand All @@ -55,14 +55,15 @@ android {
}

dependencies {
implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"
implementation "androidx.lifecycle:lifecycle-livedata:2.2.0"
implementation "androidx.lifecycle:lifecycle-runtime:2.2.0"
implementation "androidx.core:core:1.5.0"
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation 'androidx.fragment:fragment:1.2.5'
implementation "androidx.games:games-activity:3.0.5"
implementation "androidx.games:games-frame-pacing:2.1.2"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel:2.10.0"
implementation "androidx.lifecycle:lifecycle-livedata:2.10.0"
implementation "androidx.lifecycle:lifecycle-runtime:2.10.0"
implementation "androidx.core:core:1.19.0"
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
implementation 'androidx.fragment:fragment:1.8.9'
implementation "androidx.games:games-activity:4.4.2"
implementation "androidx.games:games-frame-pacing:2.1.3"

// Example of using local .aar files in libs/ directory.
// Comment out the androidx.games implementation lines if
Expand Down
2 changes: 1 addition & 1 deletion agdk/game_mode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.9.1'
classpath 'com.android.tools.build:gradle:9.2.1'
}
}

Expand Down
Loading