Skip to content

Commit

Permalink
Backed out 10 changesets (bug 1234629, bug 1233882) for bustage on An…
Browse files Browse the repository at this point in the history
…droid rc tests

Backed out changeset 9aa32d9a25df (bug 1234629)
Backed out changeset d73d36c9619b (bug 1234629)
Backed out changeset a7f63b3721cd (bug 1233882)
Backed out changeset c79f4a8c3e86 (bug 1234629)
Backed out changeset 400c030d3c01 (bug 1234629)
Backed out changeset 54a3d0851bc6 (bug 1234629)
Backed out changeset f80912ecfa87 (bug 1234629)
Backed out changeset 50bcadca2131 (bug 1234629)
Backed out changeset aaa420ed66d7 (bug 1234629)
Backed out changeset 7a62e97f07c2 (bug 1234629)

--HG--
rename : mobile/android/app/lint.xml => mobile/android/app/base/lint.xml
rename : mobile/android/app/src/main/resources/robolectric.properties => mobile/android/tests/background/junit4/resources/robolectric.properties
extra : commitid : KJVIqyGBEZg
  • Loading branch information
nigelbabu committed Feb 5, 2016
1 parent 93889a8 commit ede1aa8
Show file tree
Hide file tree
Showing 27 changed files with 254 additions and 672 deletions.
1 change: 0 additions & 1 deletion config/makefiles/java-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ $(foreach extra_package,$(ANDROID_EXTRA_PACKAGES), \
@$(TOUCH) $@
$(AAPT) package -f -M $< -I $(ANDROID_SDK)/android.jar $(_ANDROID_RES_FLAG) $(_ANDROID_ASSETS_FLAG) \
--custom-package $(ANDROID_APK_PACKAGE) \
--rename-manifest-package $(ANDROID_APK_PACKAGE) \
--non-constant-id \
--auto-add-overlay \
$(if $(ANDROID_EXTRA_PACKAGES),--extra-packages $(subst $(NULL) ,:,$(strip $(ANDROID_EXTRA_PACKAGES)))) \
Expand Down
1 change: 0 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -8540,7 +8540,6 @@ AC_SUBST(MOZ_DISABLE_GECKOVIEW)
AC_SUBST(MOZ_ANDROID_GCM)
AC_SUBST(MOZ_ANDROID_GECKOLIBS_AAR)
AC_SUBST(MOZ_ANDROID_SEARCH_ACTIVITY)
AC_SUBST(MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER)
AC_SUBST(MOZ_ANDROID_MLS_STUMBLER)
AC_SUBST(MOZ_ANDROID_DOWNLOADS_INTEGRATION)
AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS)
Expand Down
142 changes: 142 additions & 0 deletions mobile/android/app/base/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
buildDir "${topobjdir}/gradle/build/mobile/android/base"

apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
targetSdkVersion 23
minSdkVersion 15
// Used by Robolectric based tests; see TestRunner.
buildConfigField 'String', 'BUILD_DIR', "\"${project.buildDir}\""
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

lintOptions {
abortOnError false
}

sourceSets {
main {
manifest.srcFile "${topsrcdir}/mobile/android/base/AndroidManifest.xml"

java {
srcDir "${topsrcdir}/mobile/android/base/java"
srcDir "${topsrcdir}/mobile/android/search/java"
srcDir "${topsrcdir}/mobile/android/javaaddons/java"
srcDir "${topsrcdir}/mobile/android/services/src/main/java"

if (mozconfig.substs.MOZ_ANDROID_MLS_STUMBLER) {
srcDir "${topsrcdir}/mobile/android/stumbler/java"
}

if (!mozconfig.substs.MOZ_CRASHREPORTER) {
exclude 'org/mozilla/gecko/CrashReporter.java'
}

if (!mozconfig.substs.MOZ_NATIVE_DEVICES) {
exclude 'org/mozilla/gecko/ChromeCast.java'
exclude 'org/mozilla/gecko/GeckoMediaPlayer.java'
exclude 'org/mozilla/gecko/MediaPlayerManager.java'
}

if (mozconfig.substs.MOZ_WEBRTC) {
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/audio_device/android/java/src"
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src"
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/video_render/android/java/src"
}

if (mozconfig.substs.MOZ_INSTALL_TRACKING) {
exclude 'org/mozilla/gecko/adjust/StubAdjustHelper.java'
} else {
exclude 'org/mozilla/gecko/adjust/AdjustHelper.java'
}

srcDir "${project.buildDir}/generated/source/preprocessed_code" // See syncPreprocessedCode.
}

res {
srcDir "${topsrcdir}/${mozconfig.substs.MOZ_BRANDING_DIRECTORY}/res"
srcDir "${project.buildDir}/generated/source/preprocessed_resources" // See syncPreprocessedResources.
srcDir "${topsrcdir}/mobile/android/base/resources"
srcDir "${topsrcdir}/mobile/android/services/src/main/res"
if (mozconfig.substs.MOZ_CRASHREPORTER) {
srcDir "${topsrcdir}/mobile/android/base/crashreporter/res"
}
}

assets {
srcDir "${topsrcdir}/mobile/android/app/assets"
}
}

test {
java {
srcDir "${topsrcdir}/mobile/android/tests/background/junit4/src"
}

resources {
srcDir "${topsrcdir}/mobile/android/tests/background/junit4/resources"
}
}
}
}

task syncPreprocessedCode(type: Sync, dependsOn: rootProject.generateCodeAndResources) {
into("${project.buildDir}/generated/source/preprocessed_code")
from("${topobjdir}/mobile/android/base/generated/preprocessed")
}

task syncPreprocessedResources(type: Sync, dependsOn: rootProject.generateCodeAndResources) {
into("${project.buildDir}/generated/source/preprocessed_resources")
from("${topobjdir}/mobile/android/base/res")
}

android.libraryVariants.all { variant ->
variant.preBuild.dependsOn syncPreprocessedCode
variant.preBuild.dependsOn syncPreprocessedResources
}

dependencies {
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:design:23.0.1'

if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
compile 'com.android.support:mediarouter-v7:23.0.1'
compile 'com.google.android.gms:play-services-basement:8.1.0'
compile 'com.google.android.gms:play-services-base:8.1.0'
compile 'com.google.android.gms:play-services-cast:8.1.0'
}

if (mozconfig.substs.MOZ_ANDROID_GCM) {
compile 'com.google.android.gms:play-services-basement:8.1.0'
compile 'com.google.android.gms:play-services-base:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
}

// Gradle based builds include LeakCanary. Mach based builds only include the no-op version of
// this library.
compile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'

compile project(':thirdparty')

testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.0'
testCompile 'org.simpleframework:simple-http:6.0.1'
testCompile 'org.mockito:mockito-core:1.10.19'
}

apply plugin: 'idea'

idea {
module {
}
}
File renamed without changes.
103 changes: 2 additions & 101 deletions mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ android {
MOZ_ANDROID_MIN_SDK_VERSION: mozconfig.substs.MOZ_ANDROID_MIN_SDK_VERSION,
MOZ_ANDROID_SHARED_ID: "${mozconfig.substs.ANDROID_PACKAGE_NAME}.sharedID",
]
// Used by Robolectric based tests; see TestRunner.
buildConfigField 'String', 'BUILD_DIR', "\"${project.buildDir}\""
}

compileOptions {
Expand Down Expand Up @@ -67,68 +65,13 @@ android {
sourceSets {
main {
manifest.srcFile "${topobjdir}/mobile/android/base/AndroidManifest.xml"

java {
srcDir "${topsrcdir}/mobile/android/base/java"
srcDir "${topsrcdir}/mobile/android/search/java"
srcDir "${topsrcdir}/mobile/android/javaaddons/java"
srcDir "${topsrcdir}/mobile/android/services/src/main/java"

if (mozconfig.substs.MOZ_ANDROID_MLS_STUMBLER) {
srcDir "${topsrcdir}/mobile/android/stumbler/java"
}

if (!mozconfig.substs.MOZ_CRASHREPORTER) {
exclude 'org/mozilla/gecko/CrashReporter.java'
}

if (!mozconfig.substs.MOZ_NATIVE_DEVICES) {
exclude 'org/mozilla/gecko/ChromeCast.java'
exclude 'org/mozilla/gecko/GeckoMediaPlayer.java'
exclude 'org/mozilla/gecko/MediaPlayerManager.java'
}

if (mozconfig.substs.MOZ_WEBRTC) {
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/audio_device/android/java/src"
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src"
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/video_render/android/java/src"
}

if (mozconfig.substs.MOZ_INSTALL_TRACKING) {
exclude 'org/mozilla/gecko/adjust/StubAdjustHelper.java'
} else {
exclude 'org/mozilla/gecko/adjust/AdjustHelper.java'
}

srcDir "${project.buildDir}/generated/source/preprocessed_code" // See syncPreprocessedCode.
}

res {
srcDir "${topsrcdir}/${mozconfig.substs.MOZ_BRANDING_DIRECTORY}/res"
srcDir "${project.buildDir}/generated/source/preprocessed_resources" // See syncPreprocessedResources.
srcDir "${topsrcdir}/mobile/android/base/resources"
srcDir "${topsrcdir}/mobile/android/services/src/main/res"
if (mozconfig.substs.MOZ_CRASHREPORTER) {
srcDir "${topsrcdir}/mobile/android/base/crashreporter/res"
}
}

assets {
srcDir "${topsrcdir}/mobile/android/app/assets"
if (mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY && !mozconfig.substs.MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER) {
// If we are packaging the bouncer, it will have the distribution, so don't put
// it in the main APK as well.
if (mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY) {
srcDir "${mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets"
}
}
}

test {
java {
srcDir "${topsrcdir}/mobile/android/tests/background/junit4/src"
}
}

androidTest {
java {
srcDir "${topsrcdir}/mobile/android/tests/browser/robocop/src"
Expand All @@ -147,36 +90,7 @@ android {
}

dependencies {
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:design:23.0.1'

if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
compile 'com.android.support:mediarouter-v7:23.0.1'
compile 'com.google.android.gms:play-services-basement:8.1.0'
compile 'com.google.android.gms:play-services-base:8.1.0'
compile 'com.google.android.gms:play-services-cast:8.1.0'
}

if (mozconfig.substs.MOZ_ANDROID_GCM) {
compile 'com.google.android.gms:play-services-basement:8.1.0'
compile 'com.google.android.gms:play-services-base:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
}

// Gradle based builds include LeakCanary. Gradle based tests include the no-op version. Mach
// based builds only include the no-op version of this library.
compile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'

compile project(':thirdparty')

testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.0'
testCompile 'org.simpleframework:simple-http:6.0.1'
testCompile 'org.mockito:mockito-core:1.10.19'

compile project(':base')
// Including the Robotium JAR directly can cause issues with dexing.
androidTestCompile 'com.jayway.android.robotium:robotium-solo:4.3.1'
}
Expand Down Expand Up @@ -212,16 +126,6 @@ task syncAssetsFromDistDir(type: Sync, dependsOn: checkAssetsExistInDistDir) {
}
}

task syncPreprocessedCode(type: Sync, dependsOn: rootProject.generateCodeAndResources) {
into("${project.buildDir}/generated/source/preprocessed_code")
from("${topobjdir}/mobile/android/base/generated/preprocessed")
}

task syncPreprocessedResources(type: Sync, dependsOn: rootProject.generateCodeAndResources) {
into("${project.buildDir}/generated/source/preprocessed_resources")
from("${topobjdir}/mobile/android/base/res")
}

// The omnijar inputs are listed as resource directory inputs to a dummy JAR.
// That arrangement labels them nicely in IntelliJ. See the comment in the
// :omnijar project for more context.
Expand Down Expand Up @@ -255,9 +159,6 @@ task buildOmnijar(type:Exec) {
}

android.applicationVariants.all { variant ->
variant.preBuild.dependsOn syncPreprocessedCode
variant.preBuild.dependsOn syncPreprocessedResources

// Like 'local' or 'localOld'.
def productFlavor = variant.productFlavors[0].name
// Like 'debug' or 'release'.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,11 @@ protected boolean doInit() {
return true;
}

// We try to find the install intent, then the APK, then the system directory, and finally
// an already copied distribution. Already copied might originate from the bouncer APK.
// We try the install intent, then the APK, then the system directory.
final boolean distributionSet =
checkIntentDistribution(referrer) ||
copyAndCheckAPKDistribution() ||
checkSystemDistribution() ||
checkDataDistribution();
checkSystemDistribution();

// If this is our first run -- and thus we weren't already in STATE_NONE or STATE_SET above --
// and we didn't find a distribution already, then we should hold on to callbacks in case we
Expand Down
10 changes: 3 additions & 7 deletions mobile/android/base/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -886,13 +886,9 @@ ANDROID_ASSETS_DIRS += [
]

if CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY']:
# If you change this, also change its equivalent in mobile/android/bouncer.
if not CONFIG['MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER']:
# If we are packaging the bouncer, it will have the distribution, so don't put
# it in the main APK as well.
ANDROID_ASSETS_DIRS += [
'%' + CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY'] + '/assets',
]
ANDROID_ASSETS_DIRS += [
'%' + CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY'] + '/assets',
]

# We do not expose MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN here because that
# would leak the value to build logs. Instead we expose the token quietly where
Expand Down
Loading

0 comments on commit ede1aa8

Please sign in to comment.