From 7a8dd29aa3f187862a5eb3176520baac79d035a3 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Wed, 3 Sep 2014 14:24:49 -0700 Subject: [PATCH] Bug 1062566 - Update to Java 1.7 and bump SDK version in AndroidEclipse build backend. r=rnewman DONTBUILD NPOTB --- python/mozbuild/mozbuild/backend/android_eclipse.py | 1 + .../android_eclipse/.settings/org.eclipse.jdt.core.prefs | 6 +++--- .../backend/templates/android_eclipse/AndroidManifest.xml | 4 ++-- python/mozbuild/mozbuild/test/backend/common.py | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/python/mozbuild/mozbuild/backend/android_eclipse.py b/python/mozbuild/mozbuild/backend/android_eclipse.py index 43f76e35e64..fb75059d523 100644 --- a/python/mozbuild/mozbuild/backend/android_eclipse.py +++ b/python/mozbuild/mozbuild/backend/android_eclipse.py @@ -239,6 +239,7 @@ class AndroidEclipseBackend(CommonBackend): else: defines['IDE_PROJECT_FILTERED_RESOURCES'] = '' defines['ANDROID_TARGET_SDK'] = self.environment.substs['ANDROID_TARGET_SDK'] + defines['MOZ_ANDROID_MIN_SDK_VERSION'] = self.environment.defines['MOZ_ANDROID_MIN_SDK_VERSION'] copier = FileCopier() finder = FileFinder(template_directory) diff --git a/python/mozbuild/mozbuild/backend/templates/android_eclipse/.settings/org.eclipse.jdt.core.prefs b/python/mozbuild/mozbuild/backend/templates/android_eclipse/.settings/org.eclipse.jdt.core.prefs index 270df58a650..57edfe23f41 100644 --- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/.settings/org.eclipse.jdt.core.prefs +++ b/python/mozbuild/mozbuild/backend/templates/android_eclipse/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,15 @@ #filter substitution eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.7 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 diff --git a/python/mozbuild/mozbuild/backend/templates/android_eclipse/AndroidManifest.xml b/python/mozbuild/mozbuild/backend/templates/android_eclipse/AndroidManifest.xml index 7ffb3e188de..57d8aca8cb0 100644 --- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/AndroidManifest.xml +++ b/python/mozbuild/mozbuild/backend/templates/android_eclipse/AndroidManifest.xml @@ -5,7 +5,7 @@ android:versionName="1.0" > + android:minSdkVersion="@MOZ_ANDROID_MIN_SDK_VERSION@" + android:targetSdkVersion="@ANDROID_TARGET_SDK@" /> diff --git a/python/mozbuild/mozbuild/test/backend/common.py b/python/mozbuild/mozbuild/test/backend/common.py index 8a8c816e5ed..9fd680dd948 100644 --- a/python/mozbuild/mozbuild/test/backend/common.py +++ b/python/mozbuild/mozbuild/test/backend/common.py @@ -34,7 +34,9 @@ CONFIGS = defaultdict(lambda: { 'substs': [], }, { 'android_eclipse': { - 'defines': [], + 'defines': [ + ('MOZ_ANDROID_MIN_SDK_VERSION', '9'), + ], 'non_global_defines': [], 'substs': [ ('ANDROID_TARGET_SDK', '16'),