Commit e52d5322 authored by Hazem Ashmawy's avatar Hazem Ashmawy Committed by Commit Bot

AW: gradle file to build boundary interfaces as a jar in AndroidX

Build boundary interfaces as a jar using java-library plugin instead of
"com.android.library" plugin. This makes it simpler and easier to embed
the compiled jar in webkit AAR file without any dirty workarounds like
unzipping the AAR or accessing intermediates build files.

Removing AndroidManifest.xml file since it's no longer needed by android
library plugin.

Bug: https://issuetracker.google.com/issues/142394338
Bug: https://issuetracker.google.com/issues/140178227
Test: manually cherry-pick change to //external and run gradlew :webkit:assembleRelease and gradlew :webview-support-interfaces:assembleRelease
Change-Id: I1df2f04bb737c1f376d7d1a70c6c5d0664e2f39c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1859990Reviewed-by: default avatarAurimas Liutikas <aurimas@chromium.org>
Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Commit-Queue: Hazem Ashmawy <hazems@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706177}
parent bdc89d87
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.chromium.support_lib_boundary">
<!-- This AndroidManifest file only exists to provide package name needed by
gradle script to build these interfaces as part of AndroidX. -->
</manifest>
......@@ -5,27 +5,21 @@
// This file is to build WebView boundary interfaces as part of the AndroidX webkit library.
// It is not meant to be used or build any targets in chromium project.
import androidx.build.SdkHelperKt
import androidx.build.SupportConfig
plugins {
id('AndroidXPlugin')
id('com.android.library')
id('java-library')
}
dependencies {
api("androidx.annotation:annotation:1.1.0")
implementation fileTree(dir: "${SdkHelperKt.getSdkPath(project.rootDir)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/",
include: "android.jar")
}
android {
// COMPILE_SDK_VERSION provided by AndroidX build scripts to build all AndroidX modules.
compileSdkVersion SupportConfig.COMPILE_SDK_VERSION
sourceSets {
main.manifest.srcFile 'AndroidManifest.xml'
main.java.srcDirs += ['src']
}
buildTypes.all {
consumerProguardFiles 'proguard.flags'
sourceSets {
main {
java.srcDirs = ['src']
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment