Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating IITC Mobile to SDK 28, fixed issues with new intel URL #1286

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 5 additions & 6 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
resourceUrlBase = settings.get('resourceUrlBase')
distUrlBase = settings.get('distUrlBase')
buildMobile = settings.get('buildMobile')
antOptions = settings.get('antOptions','')
antBuildFile = settings.get('antBuildFile', 'mobile/build.xml');


# plugin wrapper code snippets. handled as macros, to ensure that
# 1. indentation caused by the "function wrapper()" doesn't apply to the plugin code body
Expand Down Expand Up @@ -288,13 +285,15 @@ def saveScriptAndMeta(script,ourDir,filename,oldDir=None):

if buildMobile != 'copyonly':
# now launch 'ant' to build the mobile project
retcode = os.system("ant %s -buildfile %s %s" % (antOptions, antBuildFile, buildMobile))
flavors = {'debug': 'assembleDebug', 'release': 'assembleRelease'}
retcode = os.system("java -cp mobile/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain -p mobile clean " + flavors[buildMobile])

if retcode != 0:
print ("Error: mobile app failed to build. ant returned %d" % retcode)
print ("Error: mobile app failed to build. gradle returned %d" % retcode)
exit(1) # ant may return 256, but python seems to allow only values <256
else:
shutil.copy("mobile/bin/IITC_Mobile-%s.apk" % buildMobile, os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile) )
shutil.copy("mobile/iitcm/build/outputs/apk/%s/com.cradle.iitc_mobile-debug.apk" % buildMobile, os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile)
)


# run any postBuild commands
Expand Down
41 changes: 5 additions & 36 deletions mobile/.gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,6 @@
.settings/
assets/total-conversion-build.user.js
assets/user-location.user.js
assets/plugins/

# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/
out/

# private ant configs
ant.properties

# Local configuration file (sdk path, etc)
.gradle
.idea
*.iml
local.properties

# Eclipse project files
.classpath
.project

# IntelliJ IDEA user settings
*.iws
.idea/workspace.xml
.idea/tasks.xml

# Proguard logs
proguard_logs/
signing.properties
.DS_Store
1 change: 0 additions & 1 deletion mobile/.idea/.name

This file was deleted.

26 changes: 0 additions & 26 deletions mobile/.idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions mobile/.idea/copyright/profiles_settings.xml

This file was deleted.

5 changes: 0 additions & 5 deletions mobile/.idea/encodings.xml

This file was deleted.

9 changes: 0 additions & 9 deletions mobile/.idea/libraries/android_support_v4.xml

This file was deleted.

40 changes: 34 additions & 6 deletions mobile/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions mobile/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions mobile/.idea/scopes/scope_settings.xml

This file was deleted.

3 changes: 1 addition & 2 deletions mobile/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mobile/HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Debugging IITC(M) **before** it has booted requires the Android Developer Tools.
Building the APK
----------------

- **ant:**
- **gradle:**
Set the ANDROID_HOME environment variable:
```export ANDROID_HOME=/path/to/android_sdk```
Then build the app via the build.py script ```./build.py mobile```
Expand Down
Loading