Skip to content

Commit

Permalink
Include android project into the sources
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Nov 20, 2024
1 parent ddf5a01 commit cd3dc78
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 76 deletions.
11 changes: 0 additions & 11 deletions android/.gitmodules

This file was deleted.

8 changes: 4 additions & 4 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {
externalNativeBuild {
cmake {
version = "3.22.1"
path = file("${project.projectDir}/src/main/cpp/CMakeLists.txt")
path = file("${project.projectDir}/CMakeLists.txt")
}
}

Expand Down Expand Up @@ -75,9 +75,9 @@ android {

sourceSets {
getByName("main") {
assets.srcDir("${project.projectDir}/src/main/cpp/xash3d-fwgs/3rdparty/extras/xash-extras")
assets.srcDir("${project.projectDir}/../../3rdparty/xash-extras")
assets.srcDir("${project.projectDir}/../moddb")
java.srcDir("${project.projectDir}/src/main/cpp/SDL/android-project/app/src/main/java")
java.srcDir("${project.projectDir}/../../3rdparty/SDL/android-project/app/src/main/java")
}
}

Expand Down Expand Up @@ -127,4 +127,4 @@ fun getBuildNum(): Int {
val qBuildNum = releaseDate.until(now, ChronoUnit.DAYS)
val minuteOfDay = now.hour * 60 + now.minute
return (qBuildNum * 10000 + minuteOfDay).toInt()
}
}
41 changes: 0 additions & 41 deletions android/app/src/main/cpp/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion android/app/src/main/cpp/SDL
Submodule SDL deleted from 2eef7c
1 change: 0 additions & 1 deletion android/app/src/main/cpp/hlsdk-portable
Submodule hlsdk-portable deleted from 0d8a19
1 change: 0 additions & 1 deletion android/app/src/main/cpp/xash3d-fwgs
Submodule xash3d-fwgs deleted from 1c84a5
19 changes: 2 additions & 17 deletions scripts/gha/deps_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ ANDROID_PLATFORM_VER="android-34"
ANDROID_NDK_VER="26.3.11579264"

echo "Download JDK 17"
wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz -qO jdk.tar.gz || exit 1
tar -xzf jdk.tar.gz
wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz -qO- | tar -xzvf - || exit 1
export JAVA_HOME=$GITHUB_WORKSPACE/jdk-17.0.7+7
export PATH=$PATH:$JAVA_HOME/bin

echo "Download hlsdk-portable"
git clone --depth 1 --recursive https://github.com/FWGS/hlsdk-portable -b mobile_hacks hlsdk || exit 1
git clone --depth 1 --recursive https://github.com/FWGS/hlsdk-portable -b mobile_hacks 3rdparty/hlsdk-portable || exit 1

echo "Download Android SDK"
mkdir -p sdk || exit 1
Expand All @@ -32,17 +31,3 @@ popd
echo "Download all needed tools and Android NDK"
yes | sdkmanager --licenses > /dev/null 2>/dev/null # who even reads licenses? :)
sdkmanager --install build-tools\;${ANDROID_BUILD_TOOLS_VER} platform-tools platforms\;${ANDROID_PLATFORM_VER} ndk\;${ANDROID_NDK_VER}

echo "Download Xash3D FWGS Android source code"
git clone --depth 1 --recursive https://github.com/FWGS/xash3d-android-project -b gradle android || exit 1
pushd android/app/src/main/cpp

mv xash3d-fwgs xash3d-fwgs-sub
ln -s $GITHUB_WORKSPACE xash3d-fwgs
echo "Installed Xash3D FWGS source symlink"

mv hlsdk-portable hlsdk-portable-sub
ln -s $GITHUB_WORKSPACE/hlsdk hlsdk-portable
echo "Installed hlsdk-portable source symlink"

popd

0 comments on commit cd3dc78

Please sign in to comment.