Skip to content

Commit

Permalink
eliminate gradle horror show now that hogmaker is self-contained
Browse files Browse the repository at this point in the history
  • Loading branch information
tophyr committed Dec 29, 2024
1 parent c0e3f87 commit a5dc732
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,6 @@ repositories {
mavenCentral()
}

def hostBuildDir = rootProject.layout.buildDirectory.file("host").get().asFile
tasks.register('configureHostTools', Exec) {
workingDir ".."
commandLine "cmake", "-B", hostBuildDir, "-G", "Ninja Multi-Config"
inputs.files fileTree(project.rootDir).matching { include "**/CMakeLists", "**/*.cmake" }
outputs.file new File(hostBuildDir, "HogMakerConfig.cmake")
}
["Debug", "RelWithDebInfo"].each { buildConfig ->
def buildHostToolsTask = tasks.register('buildHostTools' + buildConfig, Exec) {
workingDir ".."
commandLine "cmake", "--build", hostBuildDir, "--target", "HogMaker", "--config", buildConfig
outputs.file new File(new File(new File(hostBuildDir, "tools"), buildConfig), "HogMaker")
dependsOn configureHostTools
}
preBuild.dependsOn buildHostToolsTask
}

android {
namespace "com.descent3.droid"
compileSdk 34
Expand All @@ -31,7 +14,7 @@ android {
versionName "1.0"
externalNativeBuild {
cmake {
arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static", "-DHogMaker_DIR=" + hostBuildDir, "-DENABLE_LOGGER=ON"
arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static", "-DENABLE_LOGGER=ON"
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
abiFilters 'arm64-v8a'
}
Expand Down

0 comments on commit a5dc732

Please sign in to comment.