Skip to content

Commit 3d7b00a

Browse files
committed
Updating Android project after latest changes to IBT.
1 parent 8288c13 commit 3d7b00a

File tree

3 files changed

+8
-31
lines changed

3 files changed

+8
-31
lines changed

source/code/example/android/simple/build.gradle.template.kts

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ plugins {
66
android {
77
// Here we use TargetSDK to have possible access to newer APIs
88
compileSdk = $(TargetSDK)
9-
// buildToolsVersion = "$ (AndroidBuildToolsVersion)"
109

1110
namespace = "$(Namespace)"
1211

@@ -31,6 +30,12 @@ android {
3130
// Defines a user-friendly version name for your app.
3231
versionName = "$(VersionName)"
3332

33+
// By default keep debug symbols, just remove it in release afterwards
34+
packaging.jniLibs.keepDebugSymbols += "**/*.so"
35+
36+
$(IBTBuildSystemIntegration)
37+
}
38+
3439
compileOptions {
3540
targetCompatibility = JavaVersion.VERSION_11
3641
sourceCompatibility = JavaVersion.VERSION_11
@@ -64,36 +69,6 @@ android {
6469
}
6570
}
6671

67-
afterEvaluate {
68-
/**
69-
* IBT Integration for FastBuild build system.
70-
* To properly handle our build system, we create a new additional tasks that mimic the behavior of built-in CMakeBuild / NdkBuild steps.
71-
* Because gradle requires the outputs to be stored in a sub-folder with a specific ABI name, IBT is handling this by default.
72-
*
73-
* NOTE: Currently only ARM64 is supported as a value ABI target using the default IBT Pipeline.
74-
* You can add additional ABI support by calling the proper pipeline for the given ABI.
75-
*/
76-
android.buildTypes.configureEach {
77-
val buildConfig = this.name.replaceFirstChar { it.titlecase() }
78-
val buildPipeline = "Android$(CompileSDK)"
79-
val abiList = listOf("ARMv8", "x64")
80-
81-
var abiTargets = emptyArray<String>()
82-
for (abi in abiList)
83-
{
84-
abiTargets += "-t"
85-
abiTargets += "all-${buildPipeline}-${abi}-${buildConfig}"
86-
}
87-
88-
val fbuildTask = tasks.register<Exec>("compile${buildConfig}UsingFastbuild") {
89-
workingDir("$(WorkspaceDir)")
90-
executable("$(WorkspaceDir)/$(ScriptFile)")
91-
commandLine(listOf("$(WorkspaceDir)/$(ScriptFile)", "build") + abiTargets)
92-
}
93-
tasks["merge${buildConfig}NativeLibs"].dependsOn(fbuildTask)
94-
}
95-
}
96-
9772
dependencies {
9873
implementation("androidx.appcompat:appcompat:1.7.1")
9974
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))

source/code/example/android/simple/private/example_android.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct TestTrait : public ice::Trait
4747

4848
TestTrait(ice::TraitContext& context) noexcept
4949
: ice::Trait{ context }
50+
, timer{ }
5051
{
5152
_context.bind<&TestTrait::logic>();
5253
_context.bind<&TestTrait::gfx>(ice::gfx::ShardID_GfxFrameUpdate);

source/code/example/android/simple/simple.bff

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
'vulkan_renderer'
4444
'iceshard_pipelines'
4545
'imgui_module'
46+
'shader_tools'
4647
}
4748
]
4849

0 commit comments

Comments
 (0)