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

Samples: Update to 16kb page sizes #2086

Merged
merged 1 commit into from
Aug 14, 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
1 change: 0 additions & 1 deletion apps/OboeTester/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ include_directories(
# link to oboe
target_link_libraries(oboetester log oboe atomic)
target_link_options(oboetester PRIVATE "-Wl,-z,max-page-size=16384")

2 changes: 1 addition & 1 deletion apps/fxlab/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ target_link_libraries( # Specifies the target library.
# Links the target library to the log library
# included in the NDK.
${log-lib})

target_link_options(native-lib PRIVATE "-Wl,-z,max-page-size=16384")
8 changes: 3 additions & 5 deletions apps/fxlab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 34
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
defaultConfig {
applicationId "com.mobileer.androidfxlab"
Expand All @@ -45,12 +43,12 @@ android {
externalNativeBuild {
cmake {
path "./CMakeLists.txt"
version "3.10.2"
}
}
dataBinding {
enabled = true
}
namespace 'com.mobileer.androidfxlab'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions apps/fxlab/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
~ limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mobileer.androidfxlab">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
1 change: 1 addition & 0 deletions apps/fxlab/app/src/main/cpp/native-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <jni.h>

#include <cassert>
#include <string>
#include <functional>
#include <utility>
Expand Down
4 changes: 2 additions & 2 deletions apps/fxlab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.7.0'
ext.kotlin_version = '1.9.0'
repositories {
google()
jcenter()

}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:8.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
3 changes: 3 additions & 0 deletions apps/fxlab/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion apps/fxlab/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
1 change: 1 addition & 0 deletions samples/LiveEffect/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ android {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.google.oboe.samples.liveEffect'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions samples/LiveEffect/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.oboe.samples.liveEffect" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-feature android:name="android.hardware.microphone" android:required="true" />
<uses-feature android:name="android.hardware.audio.output" android:required="true" />
Expand Down
1 change: 1 addition & 0 deletions samples/LiveEffect/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ target_link_libraries(liveEffect
android
atomic
log)
target_link_options(liveEffect PRIVATE "-Wl,-z,max-page-size=16384")

# Enable optimization flags: if having problems with source level debugging,
# disable -Ofast ( and debug ), re-enable it after done debugging.
Expand Down
1 change: 1 addition & 0 deletions samples/MegaDrone/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ android {
path "src/main/cpp/CMakeLists.txt"
}
}
namespace 'com.google.oboe.samples.megadrone'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions samples/MegaDrone/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.oboe.samples.megadrone">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
3 changes: 2 additions & 1 deletion samples/MegaDrone/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ add_library( megadrone SHARED
MegaDroneEngine.cpp
)

target_link_libraries( megadrone log oboe )
target_link_libraries(megadrone log oboe )
target_link_options(megadrone PRIVATE "-Wl,-z,max-page-size=16384")

# Enable optimization flags: if having problems with source level debugging,
# disable -Ofast ( and debug ), re-enable it after done debugging.
Expand Down
4 changes: 2 additions & 2 deletions samples/RhythmGame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ else()
set (TARGET_LIBS ${TARGET_LIBS} mediandk)
endif()

target_link_libraries( native-lib ${TARGET_LIBS} )

target_link_libraries(native-lib ${TARGET_LIBS} )
target_link_options(native-lib PRIVATE "-Wl,-z,max-page-size=16384")

# Set the path to the Oboe directory.
set (OBOE_DIR ../..)
Expand Down
1 change: 1 addition & 0 deletions samples/RhythmGame/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ android {
}
*/
}
namespace 'com.google.oboe.samples.rhythmgame'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions samples/RhythmGame/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.oboe.samples.rhythmgame">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
1 change: 1 addition & 0 deletions samples/SoundBoard/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ android {
path "src/main/cpp/CMakeLists.txt"
}
}
namespace 'com.google.oboe.samples.soundboard'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions samples/SoundBoard/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.oboe.samples.soundboard">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
3 changes: 2 additions & 1 deletion samples/SoundBoard/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ add_library( soundboard SHARED
SoundBoardEngine.cpp
)

target_link_libraries( soundboard log oboe )
target_link_libraries(soundboard log oboe )
target_link_options(soundboard PRIVATE "-Wl,-z,max-page-size=16384")

# Enable optimization flags: if having problems with source level debugging,
# disable -Ofast ( and debug ), re-enable it after done debugging.
Expand Down
1 change: 1 addition & 0 deletions samples/audio-device/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
namespace 'com.google.oboe.samples.audio_device'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion samples/audio-device/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<manifest package="com.google.oboe.samples.audio_device">
<manifest>
</manifest>
2 changes: 1 addition & 1 deletion samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:8.5.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand Down
1 change: 1 addition & 0 deletions samples/drumthumper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ android {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.plausiblesoftware.drumthumper'
}

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

<application
android:allowBackup="true"
Expand Down
1 change: 1 addition & 0 deletions samples/drumthumper/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ target_link_libraries( # Specifies the target library.
# Links the target library to the log library
# included in the NDK.
log)
target_link_options(drumthumper PRIVATE "-Wl,-z,max-page-size=16384")
3 changes: 3 additions & 0 deletions samples/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
2 changes: 1 addition & 1 deletion samples/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
1 change: 1 addition & 0 deletions samples/hello-oboe/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ android {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.google.oboe.samples.hellooboe'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions samples/hello-oboe/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.oboe.samples.hellooboe" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-feature android:name="android.hardware.audio.output" android:required="true" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
Expand Down
1 change: 1 addition & 0 deletions samples/hello-oboe/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ add_library(hello-oboe SHARED

# Specify the libraries needed for hello-oboe
target_link_libraries(hello-oboe android log oboe)
target_link_options(hello-oboe PRIVATE "-Wl,-z,max-page-size=16384")

# Enable optimization flags: if having problems with source level debugging,
# disable -Ofast ( and debug ), re-enable after done debugging.
Expand Down
1 change: 1 addition & 0 deletions samples/iolib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ android {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.google.oboe.samples.iolib'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions samples/iolib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.oboe.samples.iolib" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
1 change: 1 addition & 0 deletions samples/minimaloboe/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ android {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
namespace 'com.example.minimaloboe'
}

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

<application
android:allowBackup="true"
Expand Down
1 change: 1 addition & 0 deletions samples/minimaloboe/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ target_link_libraries( # Specifies the target library.
# Links the target library to the log library
# included in the NDK.
log)
target_link_options(minimaloboe PRIVATE "-Wl,-z,max-page-size=16384")
1 change: 1 addition & 0 deletions samples/parselib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.google.oboe.samples'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions samples/parselib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.oboe.samples" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ add_executable(
)

target_link_libraries(testOboe gtest oboe)
target_link_options(testOboe PRIVATE "-Wl,-z,max-page-size=16384")
1 change: 1 addition & 0 deletions tests/UnitTestRunner/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ android {
path file('../../CMakeLists.txt')
}
}
namespace 'com.google.oboe.tests.unittestrunner'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions tests/UnitTestRunner/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.oboe.tests.unittestrunner">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
Expand Down
2 changes: 1 addition & 1 deletion tests/UnitTestRunner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:8.5.1'
}
}

Expand Down
3 changes: 3 additions & 0 deletions tests/UnitTestRunner/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip