Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
f8309f86
Unverified
Commit
f8309f86
authored
Apr 10, 2017
by
Ramesh Ravone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Android: avoiding duplicates in build.gradle
parent
1c480698
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
23 deletions
+21
-23
methods.py
methods.py
+18
-20
SCsub
platform/android/SCsub
+3
-3
No files found.
methods.py
View file @
f8309f86
...
...
@@ -1353,66 +1353,64 @@ def win32_spawn(sh, escape, cmd, args, spawnenv):
return exit_code
"""
def
android_add_maven_repository
(
self
,
url
):
self
.
android_maven_repos
.
append
(
url
)
if
(
url
not
in
self
.
android_maven_repos
):
self
.
android_maven_repos
.
append
(
url
)
def
android_add_dependency
(
self
,
depline
):
self
.
android_dependencies
.
append
(
depline
)
if
(
depline
not
in
self
.
android_dependencies
):
self
.
android_dependencies
.
append
(
depline
)
def
android_add_java_dir
(
self
,
subpath
):
base_path
=
self
.
Dir
(
"."
)
.
abspath
+
"/modules/"
+
self
.
current_module
+
"/"
+
subpath
self
.
android_java_dirs
.
append
(
base_path
)
if
(
base_path
not
in
self
.
android_java_dirs
):
self
.
android_java_dirs
.
append
(
base_path
)
def
android_add_res_dir
(
self
,
subpath
):
base_path
=
self
.
Dir
(
"."
)
.
abspath
+
"/modules/"
+
self
.
current_module
+
"/"
+
subpath
self
.
android_res_dirs
.
append
(
base_path
)
if
(
base_path
not
in
self
.
android_res_dirs
):
self
.
android_res_dirs
.
append
(
base_path
)
def
android_add_aidl_dir
(
self
,
subpath
):
base_path
=
self
.
Dir
(
"."
)
.
abspath
+
"/modules/"
+
self
.
current_module
+
"/"
+
subpath
self
.
android_aidl_dirs
.
append
(
base_path
)
if
(
base_path
not
in
self
.
android_aidl_dirs
):
self
.
android_aidl_dirs
.
append
(
base_path
)
def
android_add_jni_dir
(
self
,
subpath
):
base_path
=
self
.
Dir
(
"."
)
.
abspath
+
"/modules/"
+
self
.
current_module
+
"/"
+
subpath
self
.
android_jni_dirs
.
append
(
base_path
)
if
(
base_path
not
in
self
.
android_jni_dirs
):
self
.
android_jni_dirs
.
append
(
base_path
)
def
android_add_gradle_plugin
(
self
,
plugin
):
self
.
android_gradle_plugins
.
append
(
plugin
)
if
(
plugin
not
in
self
.
android_gradle_plugins
):
self
.
android_gradle_plugins
.
append
(
plugin
)
def
android_add_gradle_classpath
(
self
,
classpath
):
self
.
android_gradle_classpath
.
append
(
classpath
)
if
(
classpath
not
in
self
.
android_gradle_classpath
):
self
.
android_gradle_classpath
.
append
(
classpath
)
def
android_add_default_config
(
self
,
config
):
self
.
android_default_config
.
append
(
config
)
if
(
config
not
in
self
.
android_default_config
):
self
.
android_default_config
.
append
(
config
)
def
android_add_to_manifest
(
self
,
file
):
base_path
=
self
.
Dir
(
"."
)
.
abspath
+
"/modules/"
+
self
.
current_module
+
"/"
+
file
f
=
open
(
base_path
,
"rb"
)
self
.
android_manifest_chunk
+=
f
.
read
()
def
android_add_to_permissions
(
self
,
file
):
base_path
=
self
.
Dir
(
"."
)
.
abspath
+
"/modules/"
+
self
.
current_module
+
"/"
+
file
f
=
open
(
base_path
,
"rb"
)
self
.
android_permission_chunk
+=
f
.
read
()
def
android_add_to_attributes
(
self
,
file
):
base_path
=
self
.
Dir
(
"."
)
.
abspath
+
"/modules/"
+
self
.
current_module
+
"/"
+
file
f
=
open
(
base_path
,
"rb"
)
self
.
android_appattributes_chunk
+=
f
.
read
()
def
disable_module
(
self
):
self
.
disabled_modules
.
append
(
self
.
current_module
)
def
use_windows_spawn_fix
(
self
,
platform
=
None
):
if
(
os
.
name
!=
"nt"
):
...
...
platform/android/SCsub
View file @
f8309f86
...
...
@@ -52,13 +52,13 @@ if len(env.android_maven_repos) > 0:
gradle_maven_repos_text
+=
""
for
x
in
env
.
android_maven_repos
:
gradle_maven_repos_text
+=
"
\t
maven {
\n
"
gradle_maven_repos_text
+=
"
\t
\t
"
+
x
+
"
\n
"
gradle_maven_repos_text
+=
"
\t
"
+
x
+
"
\n
"
gradle_maven_repos_text
+=
"
\t
}
\n
"
gradle_maven_dependencies_text
=
""
for
x
in
env
.
android_dependencies
:
gradle_maven_dependencies_text
+=
x
+
"
\n
"
gradle_maven_dependencies_text
+=
x
+
"
\n
\t
"
gradle_java_dirs_text
=
""
...
...
@@ -98,7 +98,7 @@ targetSdk = 23
for
x
in
env
.
android_default_config
:
if
x
.
startswith
(
"minSdkVersion"
)
and
int
(
x
.
split
(
" "
)[
-
1
])
<
minSdk
:
x
=
"minSdkVersion "
+
str
(
minSdk
)
if
x
.
startswith
(
"targetSdkVersion"
)
and
int
(
x
.
split
()[
-
1
])
>
targetSdk
:
if
x
.
startswith
(
"targetSdkVersion"
)
and
int
(
x
.
split
(
" "
)[
-
1
])
>
targetSdk
:
x
=
"targetSdkVersion "
+
str
(
targetSdk
)
gradle_default_config_text
+=
x
+
"
\n\t\t
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment