Bug 880118 - Integrate the GeckoView library into the build system. r=glandium

This commit is contained in:
Shane Tully 2013-08-23 16:36:01 -07:00
parent a18a0819ca
commit 231abf2e3a
8 changed files with 135 additions and 1 deletions

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="geckoview_library/libs/armeabi-v7a"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>GeckoView</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mozilla.geckoview"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
</manifest>

View File

@ -0,0 +1,45 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
INSTALL_TARGETS += GECKOVIEW_LIBRARY
GECKOVIEW_LIBRARY_DEST = $(CURDIR)
GECKOVIEW_LIBRARY_FILES := \
.classpath \
.project \
AndroidManifest.xml \
project.properties \
$(NULL)
include $(topsrcdir)/config/rules.mk
package:
# Make directory for the zips
$(MKDIR) -p $(DIST)/geckoview_library
# Zip the assets
cd $(DIST)/fennec; \
$(ZIP) -r ../geckoview_library/geckoview_assets.zip assets
# Make empty directories to fit an Android project structure
$(MKDIR) -p bin gen libs/$(ABI_DIR) src
# Copy the JARs
cp ../base/jars/* libs/
# Copy the SOs
cp $(DIST)/bin/libmozglue.so $(DIST)/bin/lib/libplugin-container.so libs/$(ABI_DIR)/
# Copy the resources
cp -R ../base/res .
# Zip the directory
cd ..; \
$(ZIP) -r ../../dist/geckoview_library/geckoview_library.zip geckoview_library --exclude geckoview_library/backend.mk geckoview_library/Makefile

View File

@ -0,0 +1,5 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-17
android.library=true

View File

@ -16,6 +16,7 @@ DIRS += [
'themes/core',
'app',
'fonts',
'geckoview_library',
]
if not CONFIG['LIBXUL_SDK']:

View File

@ -344,6 +344,10 @@ else
INNER_ROBOCOP_PACKAGE=echo 'Testing is disabled - No Robocop for you'
endif
# Create geckoview_library/geckoview_{assets,library}.zip for third-party GeckoView consumers.
INNER_MAKE_GECKOVIEW_LIBRARY= \
$(MAKE) -C ../mobile/android/geckoview_library package ABI_DIR=$(ABI_DIR)
ifdef MOZ_OMX_PLUGIN
DIST_FILES += libomxplugin.so libomxplugingb.so libomxplugingb235.so libomxpluginhc.so libomxpluginsony.so libomxpluginfroyo.so libomxpluginjb-htc.so
endif
@ -394,7 +398,8 @@ INNER_MAKE_PACKAGE = \
cp $(_ABS_DIST)/gecko.apk $(_ABS_DIST)/gecko-unsigned-unaligned.apk && \
$(RELEASE_JARSIGNER) $(_ABS_DIST)/gecko.apk && \
$(ZIPALIGN) -f -v 4 $(_ABS_DIST)/gecko.apk $(PACKAGE) && \
$(INNER_ROBOCOP_PACKAGE)
$(INNER_ROBOCOP_PACKAGE) && \
$(INNER_MAKE_GECKOVIEW_LIBRARY)
# Language repacks root the resources contained in assets/omni.ja
# under assets/, but the repacks expect them to be rooted at /.