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

customizability options #919

Merged
merged 1 commit into from
Dec 22, 2019
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ fullscreen = 0
# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

# (str) Android app theme, default is ok for Kivy-based app
# android.apptheme = "@android:style/Theme.NoTitleBar"

# (list) Pattern to whitelist for the whole project
#android.whitelist =

Expand Down Expand Up @@ -155,6 +158,23 @@ fullscreen = 0
# bootstrap)
#android.gradle_dependencies =

# (list) add java compile options
# this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option
# see https://developer.android.com/studio/write/java8-support for further information
# android.add_compile_options = "sourceCompatibility = 1.8", "targetCompatibility = 1.8"

# (list) Gradle repositories to add {can be necessary for some android.gradle_dependencies}
# please enclose in double quotes
# e.g. android.gradle_repositories = "maven { url 'https://kotlin.bintray.com/ktor' }"
#android.add_gradle_repositories =

# (list) packaging options to add
# see https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
# can be necessary to solve conflicts in gradle_dependencies
# please enclose in double quotes
# e.g. android.add_packaging_options = "exclude 'META-INF/common.kotlin_module'", "exclude 'META-INF/*.kotlin_module'"
#android.add_gradle_repositories =

# (list) Java classes to add as activities to the manifest.
#android.add_activites = com.example.ExampleActivity

Expand Down
26 changes: 25 additions & 1 deletion buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,8 @@ def cmd_run(self, *args):
super(TargetAndroid, self).cmd_run(*args)

entrypoint = self.buildozer.config.getdefault(
'app', 'android.entrypoint', 'org.renpy.android.PythonActivity')
'app', 'android.entrypoint', 'org.kivy.android.PythonActivity')

package = self._get_package()

# push on the device
Expand Down Expand Up @@ -1011,6 +1012,29 @@ def build_package(self):
permission = '.'.join(permission)
build_cmd += [("--permission", permission)]

# android.entrypoint
entrypoint = config.getdefault('app', 'android.entrypoint', 'org.kivy.android.PythonActivity')
build_cmd += [('--android-entrypoint', entrypoint)]

# android.apptheme
apptheme = config.getdefault('app', 'android.apptheme', '@android:style/Theme.NoTitleBar')
build_cmd += [('--android-apptheme', apptheme)]

# android.compile_options
compile_options = config.getlist('app', 'android.add_compile_options', [])
for option in compile_options:
build_cmd += [('--add-compile-option', option)]

# android.add_gradle_repositories
repos = config.getlist('app','android.add_gradle_repositories', [])
for repo in repos:
build_cmd += [('--add-gradle-repository', repo)]

# android packaging options
pkgoptions = config.getlist('app','android.add_packaging_options', [])
for pkgoption in pkgoptions:
build_cmd += [('--add-packaging-option', pkgoption)]

# meta-data
meta_datas = config.getlistvalues('app', 'android.meta_data', [])
for meta in meta_datas:
Expand Down