mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1234629 - Post: Add Gradle support for bouncer. r=me
This commit is contained in:
parent
6b67826901
commit
1c6c3b60c1
@ -114,7 +114,9 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assets {
|
assets {
|
||||||
if (mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY) {
|
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.
|
||||||
srcDir "${mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets"
|
srcDir "${mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets"
|
||||||
}
|
}
|
||||||
srcDir "${topsrcdir}/mobile/android/app/assets"
|
srcDir "${topsrcdir}/mobile/android/app/assets"
|
||||||
|
@ -22,4 +22,9 @@ manifest_FLAGS += \
|
|||||||
-DMOZ_ANDROID_SHARED_FXACCOUNT_TYPE="$(MOZ_ANDROID_SHARED_FXACCOUNT_TYPE)" \
|
-DMOZ_ANDROID_SHARED_FXACCOUNT_TYPE="$(MOZ_ANDROID_SHARED_FXACCOUNT_TYPE)" \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
# Targets built very early during a Gradle build.
|
||||||
|
gradle-targets: $(abspath AndroidManifest.xml)
|
||||||
|
|
||||||
|
.PHONY: gradle-targets
|
||||||
|
|
||||||
libs:: $(ANDROID_APK_NAME).apk
|
libs:: $(ANDROID_APK_NAME).apk
|
||||||
|
76
mobile/android/bouncer/build.gradle
Normal file
76
mobile/android/bouncer/build.gradle
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
buildDir "${topobjdir}/gradle/build/mobile/android/bouncer"
|
||||||
|
|
||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 23
|
||||||
|
buildToolsVersion "23.0.1"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
targetSdkVersion 23
|
||||||
|
minSdkVersion 15
|
||||||
|
applicationId mozconfig.substs.ANDROID_PACKAGE_NAME
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
|
}
|
||||||
|
|
||||||
|
dexOptions {
|
||||||
|
javaMaxHeapSize "2g"
|
||||||
|
}
|
||||||
|
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
manifest.srcFile "${topobjdir}/mobile/android/bouncer/AndroidManifest.xml"
|
||||||
|
assets {
|
||||||
|
if (mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY) {
|
||||||
|
srcDir "${mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
java {
|
||||||
|
srcDir 'java'
|
||||||
|
}
|
||||||
|
res {
|
||||||
|
srcDir "${topsrcdir}/${mozconfig.substs.MOZ_BRANDING_DIRECTORY}/res" // For the icon.
|
||||||
|
srcDir 'res'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task generateCodeAndResources(type:Exec) {
|
||||||
|
workingDir "${topobjdir}"
|
||||||
|
|
||||||
|
commandLine mozconfig.substs.GMAKE
|
||||||
|
args '-C'
|
||||||
|
args "${topobjdir}/mobile/android/bouncer"
|
||||||
|
args 'gradle-targets'
|
||||||
|
|
||||||
|
// Only show the output if something went wrong.
|
||||||
|
ignoreExitValue = true
|
||||||
|
standardOutput = new ByteArrayOutputStream()
|
||||||
|
errorOutput = standardOutput
|
||||||
|
doLast {
|
||||||
|
if (execResult.exitValue != 0) {
|
||||||
|
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${execResult.exitValue}:\n\n${standardOutput.toString()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
android.applicationVariants.all {
|
||||||
|
preBuild.dependsOn generateCodeAndResources
|
||||||
|
}
|
||||||
|
}
|
@ -36,6 +36,11 @@ project(':app').projectDir = new File("${json.topsrcdir}/mobile/android/app")
|
|||||||
project(':omnijar').projectDir = new File("${json.topsrcdir}/mobile/android/app/omnijar")
|
project(':omnijar').projectDir = new File("${json.topsrcdir}/mobile/android/app/omnijar")
|
||||||
project(':thirdparty').projectDir = new File("${json.topsrcdir}/mobile/android/thirdparty")
|
project(':thirdparty').projectDir = new File("${json.topsrcdir}/mobile/android/thirdparty")
|
||||||
|
|
||||||
|
if (json.substs.MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER) {
|
||||||
|
include ':bouncer'
|
||||||
|
project(':bouncer').projectDir = new File("${json.topsrcdir}/mobile/android/bouncer")
|
||||||
|
}
|
||||||
|
|
||||||
// The Gradle instance is shared between settings.gradle and all the
|
// The Gradle instance is shared between settings.gradle and all the
|
||||||
// other build.gradle files (see
|
// other build.gradle files (see
|
||||||
// http://forums.gradle.org/gradle/topics/define_extension_properties_from_settings_xml).
|
// http://forums.gradle.org/gradle/topics/define_extension_properties_from_settings_xml).
|
||||||
|
Loading…
Reference in New Issue
Block a user