Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit aeac14b

Browse files
committed
Reverted to more stable gradle plugin (+added retrolambda because lambdas aren't supported on stable yet);
Rebuilt cmake libs in release; Fixed launcher losing some vcmi config options;
1 parent b5d3d6e commit aeac14b

39 files changed

+24
-9
lines changed

build.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
PARAM_FIXES = 0
1212
PARAM_BUILD_EXT = 1
1313
PARAM_BUILD_CMAKE = 2
14+
PARAM_BUILD_APP = 3
1415

1516
def copyLibs():
1617
vcmiutil.copytree("./libs/", conf["extOutput"])
@@ -69,7 +70,13 @@ def buildFFMPEG():
6970
def buildCMakeExternals():
7071
os.chdir("project")
7172
os.environ["JAVA_HOME"] = conf["javaRoot"]
72-
cmd = "gradlew -a :vcmi-app:compileLibsOnlyDebugSources"
73+
cmd = "gradlew -a :vcmi-app:compileLibsOnly{}Sources".format(conf["cmakeBuildMode"])
74+
assertZero(os.system(cmd), cmd)
75+
76+
def buildApp():
77+
os.chdir("project")
78+
os.environ["JAVA_HOME"] = conf["javaRoot"]
79+
cmd = "gradlew -a :vcmi-app:assembleVcmiOnly{}".format(conf["cmakeBuildMode"])
7380
assertZero(os.system(cmd), cmd)
7481

7582
def buildAllOptional():
@@ -91,17 +98,18 @@ def inputError():
9198

9299
args = len(sys.argv)
93100
if args < 2:
94-
print("run with any of these: all, build, fixpaths")
95-
sys.exit(1)
101+
inputError()
96102

97-
parsedParams = [False, False, False]
103+
parsedParams = [False, False, False, False]
98104
for arg in sys.argv[1:]:
99105
if arg == "all" or arg == "build-optional":
100106
parsedParams[PARAM_BUILD_EXT] = True
101107
if arg == "all" or arg == "build-cmake":
102108
parsedParams[PARAM_BUILD_CMAKE] = True
103109
if arg == "all" or arg == "fixpaths":
104110
parsedParams[PARAM_FIXES] = True
111+
if arg == "all" or arg == "build-app":
112+
parsedParams[PARAM_BUILD_APP] = True
105113

106114
executedAnything = False
107115
if parsedParams[PARAM_FIXES]:
@@ -113,6 +121,9 @@ def inputError():
113121
if parsedParams[PARAM_BUILD_CMAKE]:
114122
buildAllCmake()
115123
executedAnything = True
124+
if parsedParams[PARAM_BUILD_APP]:
125+
timed(buildApp, "app")
126+
executedAnything = True
116127

117128
if executedAnything == False:
118129
inputError()
-280 KB
Binary file not shown.
66.3 KB
Binary file not shown.
-212 KB
Binary file not shown.
-368 KB
Binary file not shown.
-1.06 KB
Binary file not shown.
-333 KB
Binary file not shown.

ext-output/arm64-v8a/libminizip.so

43.3 KB
Binary file not shown.
8 Bytes
Binary file not shown.
-215 KB
Binary file not shown.
-32.8 KB
Binary file not shown.
-761 KB
Binary file not shown.
Binary file not shown.
-1.15 KB
Binary file not shown.
-346 KB
Binary file not shown.

ext-output/armeabi-v7a/libminizip.so

-816 Bytes
Binary file not shown.
4 Bytes
Binary file not shown.

ext-output/x86/libboost-datetime.so

-269 KB
Binary file not shown.

ext-output/x86/libboost-filesystem.so

-107 KB
Binary file not shown.

ext-output/x86/libboost-locale.so

-807 KB
Binary file not shown.
-895 KB
Binary file not shown.

ext-output/x86/libboost-system.so

-1.79 KB
Binary file not shown.

ext-output/x86/libboost-thread.so

-429 KB
Binary file not shown.

ext-output/x86/libminizip.so

2.16 KB
Binary file not shown.

ext-output/x86/libvcmi-fuzzylite.so

4 Bytes
Binary file not shown.
-269 KB
Binary file not shown.
2.46 KB
Binary file not shown.

ext-output/x86_64/libboost-locale.so

-303 KB
Binary file not shown.
-478 KB
Binary file not shown.

ext-output/x86_64/libboost-system.so

-1.21 KB
Binary file not shown.

ext-output/x86_64/libboost-thread.so

-338 KB
Binary file not shown.

ext-output/x86_64/libminizip.so

35.2 KB
Binary file not shown.
0 Bytes
Binary file not shown.

ext/vcmi

project/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ buildscript {
33

44
repositories {
55
jcenter()
6+
mavenCentral()
67
}
78
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.4.0-alpha7'
9+
classpath 'com.android.tools.build:gradle:2.3.2'
10+
classpath 'me.tatarka:gradle-retrolambda:3.6.1'
911
}
1012
}
1113

project/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-milestone-1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip

project/vcmi-app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.application'
2+
apply plugin: 'me.tatarka.retrolambda'
23

34
android {
45
compileSdkVersion VCMI_COMPILE_SDK

project/vcmi-app/src/main/java/eu/vcmi/vcmi/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private String toJson() throws JSONException
134134
final JSONObject generalNode = accessGeneralNode(mRawObject);
135135
final JSONObject screenResNode = accessScreenResNode(mRawObject);
136136

137-
final JSONObject root = new JSONObject();
137+
final JSONObject root = mRawObject;
138138
final JSONObject general = generalNode == null ? new JSONObject() : generalNode;
139139
final JSONObject video = new JSONObject();
140140
final JSONObject screenRes = screenResNode == null ? new JSONObject() : screenResNode;

vcmiconf.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"javaRoot": "Q:/P/Java/8",
1111
"abis" : "armeabi-v7a arm64-v8a x86 x86_64",
1212
"boostFolderName" : "boost_1_64_0",
13-
"androidApi" : 21
13+
"androidApi" : 21,
14+
"cmakeBuildMode" : "Release"
1415
}

0 commit comments

Comments
 (0)