Fixes #103.
'r9b': "/home/vagrant/android-ndk/r9b",
'r10e': "/home/vagrant/android-ndk/r10e",
}
+java_paths = {
+ '1.7': "/usr/lib/jvm/java-7-openjdk",
+ '1.8': "/usr/lib/jvm/java-8-openjdk",
+}
command "apt-get update"
end
-%w{ant ant-contrib autoconf autoconf2.13 automake1.11 autopoint bison bzr cmake curl expect faketime flex gettext git-core git-svn gperf graphviz imagemagick inkscape javacc libarchive-zip-perl liblzma-dev librsvg2-bin libsaxonb-java libssl-dev libssl1.0.0 libtool make maven mercurial nasm openjdk-7-jdk optipng pandoc perlmagick pkg-config python python-yaml python-gnupg python-magic python-setuptools python3-gnupg quilt realpath scons subversion swig texinfo transfig unzip vorbis-tools xsltproc yasm zip}.each do |pkg|
+%w{ant ant-contrib autoconf autoconf2.13 automake1.11 autopoint bison bzr cmake curl expect faketime flex gettext git-core git-svn gperf graphviz imagemagick inkscape javacc libarchive-zip-perl liblzma-dev librsvg2-bin libsaxonb-java libssl-dev libssl1.0.0 libtool make maven mercurial nasm openjdk-7-jdk openjdk-8-jdk optipng pandoc perlmagick pkg-config python python-yaml python-gnupg python-magic python-setuptools python3-gnupg quilt realpath scons subversion swig texinfo transfig unzip vorbis-tools xsltproc yasm zip}.each do |pkg|
package pkg do
action :install
end
not_if "grep bsenv /home/#{user}/.bashrc"
end
+execute "set-default-java" do
+ user user
+ command "update-java-alternatives --set java-7-openjdk"
+end
# 'r10e': "$ANDROID_NDK",
# }
+# If you want to build apps that use retrolambda and Java 1.8, you'll need to
+# have both 1.7 and 1.8 installed.
+# java_paths = {
+# '1.7': "/usr/lib/jvm/java-7-openjdk",
+# '1.8': None,
+# }
+
# Build tools version to be used
# build_tools = "23.0.1"
'r10e': "$ANDROID_NDK",
},
'build_tools': "23.0.1",
+ 'java_paths': {
+ '1.7': "/usr/lib/jvm/java-7-openjdk",
+ '1.8': None,
+ },
'ant': "ant",
'mvn3': "mvn",
'gradle': 'gradle',
thisconfig[k] = exp
thisconfig[k + '_orig'] = v
- for k in ['ndk_paths']:
+ for k in ['ndk_paths', 'java_paths']:
d = thisconfig[k]
for k2 in d.copy():
v = d[k2]
for n in ['ANDROID_HOME', 'ANDROID_SDK']:
env[n] = config['sdk_path']
+ for v in ['7', '8']:
+ cpath = config['java_paths']['1.%s' % v]
+ if cpath:
+ env['JAVA%s_HOME' % v] = cpath
+
for k in ["keystorepass", "keypass"]:
if k in config:
write_password_file(k)