Switch build tool to Gradle (#15)
This commit is contained in:
parent
968c5d1f8e
commit
4f720ece58
141 changed files with 6362 additions and 500 deletions
p4a/pythonforandroid
|
@ -6,7 +6,7 @@ import json
|
|||
import importlib
|
||||
|
||||
from pythonforandroid.logger import (warning, shprint, info, logger,
|
||||
debug)
|
||||
debug, error)
|
||||
from pythonforandroid.util import (current_directory, ensure_dir,
|
||||
temp_directory, which)
|
||||
from pythonforandroid.recipe import Recipe
|
||||
|
@ -178,8 +178,6 @@ class Bootstrap(object):
|
|||
This is the only way you should access a bootstrap class, as
|
||||
it sets the bootstrap directory correctly.
|
||||
'''
|
||||
# AND: This method will need to check user dirs, and access
|
||||
# bootstraps in a slightly different way
|
||||
if name is None:
|
||||
return None
|
||||
if not hasattr(cls, 'bootstraps'):
|
||||
|
@ -195,20 +193,21 @@ class Bootstrap(object):
|
|||
bootstrap.ctx = ctx
|
||||
return bootstrap
|
||||
|
||||
def distribute_libs(self, arch, src_dirs, wildcard='*'):
|
||||
def distribute_libs(self, arch, src_dirs, wildcard='*', dest_dir="libs"):
|
||||
'''Copy existing arch libs from build dirs to current dist dir.'''
|
||||
info('Copying libs')
|
||||
tgt_dir = join('libs', arch.arch)
|
||||
tgt_dir = join(dest_dir, arch.arch)
|
||||
ensure_dir(tgt_dir)
|
||||
for src_dir in src_dirs:
|
||||
for lib in glob.glob(join(src_dir, wildcard)):
|
||||
shprint(sh.cp, '-a', lib, tgt_dir)
|
||||
|
||||
def distribute_javaclasses(self, javaclass_dir):
|
||||
def distribute_javaclasses(self, javaclass_dir, dest_dir="src"):
|
||||
'''Copy existing javaclasses from build dir to current dist dir.'''
|
||||
info('Copying java files')
|
||||
ensure_dir(dest_dir)
|
||||
for filename in glob.glob(javaclass_dir):
|
||||
shprint(sh.cp, '-a', filename, 'src')
|
||||
shprint(sh.cp, '-a', filename, dest_dir)
|
||||
|
||||
def distribute_aars(self, arch):
|
||||
'''Process existing .aar bundles and copy to current dist dir.'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue