Skip to content
Permalink
Browse files

open source missing java bits of android build I guess

  • Loading branch information...
UnknownShadow200 committed Nov 8, 2019
1 parent f0fc773 commit f906f63ed7a9878e0f8c3d32f6a409b49025fa32
@@ -10,8 +10,16 @@
*.VC.db
*.VC.VC.opendb

# Android build results
android/.gradle/
android/gradle/
android/build/
android/app/build/
android/app/.externalNativeBuild/
android/local.properties
*.iml

# Build results
[Aa]ndroid/
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
@@ -0,0 +1,107 @@
#
# Copyright (C) The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)

# build native_app_glue as a static lib
set(${CMAKE_C_FLAGS}, "${CMAKE_C_FLAGS}")
# now build app's shared lib
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall -Werror")

add_library(classicube SHARED
../../src/Program.c
../../src/_fttype1.c
../../src/IsometricDrawer.c
../../src/_ftcid.c
../../src/Builder.c
../../src/ExtMath.c
../../src/_ftbitmap.c
../../src/Utils.c
../../src/Camera.c
../../src/Game.c
../../src/Window.c
../../src/_ftbase.c
../../src/Graphics.c
../../src/_type1cid.c
../../src/Deflate.c
../../src/_cff.c
../../src/_ftsynth.c
../../src/String.c
../../src/LWidgets.c
../../src/Options.c
../../src/Drawer2D.c
../../src/Server.c
../../src/Entity.c
../../src/Drawer.c
../../src/Vorbis.c
../../src/Protocol.c
../../src/World.c
../../src/PickedPosRenderer.c
../../src/Platform.c
../../src/LScreens.c
../../src/_truetype.c
../../src/_ftglyph.c
../../src/Model.c
../../src/_autofit.c
../../src/Vectors.c
../../src/_raster.c
../../src/HeldBlockRenderer.c
../../src/Inventory.c
../../src/Launcher.c
../../src/Block.c
../../src/LWeb.c
../../src/Stream.c
../../src/Lighting.c
../../src/Resources.c
../../src/PackedCol.c
../../src/Screens.c
../../src/Formats.c
../../src/_sfnt.c
../../src/Bitmap.c
../../src/EntityComponents.c
../../src/_pshinter.c
../../src/Http.c
../../src/MapRenderer.c
../../src/Audio.c
../../src/_ftinit.c
../../src/Event.c
../../src/Logger.c
../../src/Widgets.c
../../src/TexturePack.c
../../src/Menus.c
../../src/BlockPhysics.c
../../src/_psmodule.c
../../src/Chat.c
../../src/Gui.c
../../src/AxisLinesRenderer.c
../../src/Picking.c
../../src/_type1.c
../../src/_smooth.c
../../src/_psaux.c
../../src/Generator.c
../../src/Input.c
../../src/Particle.c
../../src/Physics.c
../../src/SelectionBox.c
../../src/EnvRenderer.c
)

# add lib dependencies
target_link_libraries(classicube
android
EGL
GLESv2
log)
@@ -0,0 +1,35 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28

defaultConfig {
applicationId = 'com.classicube.ClassiCube'
minSdkVersion 14
targetSdkVersion 28
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_static'
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
version '3.10.2'
path 'CMakeLists.txt'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.classicube.ClassiCube"
android:versionCode="1"
android:versionName="1.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />

<application
android:allowBackup="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"
android:label="ClassiCube">

<!-- Our activity is the built-in NativeActivity framework class.
This will take care of integrating with our NDK code. -->
<activity android:name="com.classicube.MainActivity"
android:label="ClassiCube"
android:configChanges="orientation|screenSize|keyboard|keyboardHidden">
<!-- Tell NativeActivity the name of our .so -->
<meta-data android:name="android.app.lib_name" android:value="classicube" />

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
<!-- END_INCLUDE(manifest) -->

0 comments on commit f906f63

Please sign in to comment.
You can’t perform that action at this time.