Skip to content

Commit

Permalink
android,binder,cronet: .aar file when publishing (#10138) (#10144)
Browse files Browse the repository at this point in the history
  • Loading branch information
temawi committed May 8, 2023
1 parent 7c894d6 commit 0847e2b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 17 deletions.
14 changes: 9 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id "maven-publish"

id "com.android.library"
id "digital.wup.android-maven-publish"
}

description = 'gRPC: Android'
Expand All @@ -23,6 +22,12 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions { abortOnError true }
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

repositories {
Expand Down Expand Up @@ -73,10 +78,9 @@ tasks.register("sourcesJar", Jar) {
publishing {
publications {
maven {
from components.android

artifact javadocJar
artifact sourcesJar
afterEvaluate {
from components.release
}
}
}
}
14 changes: 9 additions & 5 deletions binder/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id "maven-publish"
id "com.android.library"
id "digital.wup.android-maven-publish"
}

description = 'gRPC BinderChannel'
Expand Down Expand Up @@ -38,6 +37,12 @@ android {
multiDexEnabled true
}
lintOptions { abortOnError false }
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

repositories {
Expand Down Expand Up @@ -129,10 +134,9 @@ tasks.register("sourcesJar", Jar) {
publishing {
publications {
maven {
from components.android

artifact javadocJar
artifact sourcesJar
afterEvaluate {
from components.release
}
}
}
}
2 changes: 1 addition & 1 deletion buildscripts/kokoro/android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cat <<EOF >> gradle.properties
# https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory
# Increased due to java.lang.OutOfMemoryError: Metaspace failures, "JVM heap
# space is exhausted", and to increase build speed
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=1024m
EOF

echo y | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;28.0.3"
Expand Down
8 changes: 8 additions & 0 deletions buildscripts/kokoro/unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ fi
# ARCH is x86_64 unless otherwise specified.
ARCH="${ARCH:-x86_64}"

cat <<EOF >> gradle.properties
# defaults to -Xmx512m -XX:MaxMetaspaceSize=256m
# https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory
# Increased due to java.lang.OutOfMemoryError: Metaspace failures, "JVM heap
# space is exhausted", and to increase build speed
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=1024m
EOF

ARCH="$ARCH" buildscripts/make_dependencies.sh

# Set properties via flags, do not pollute gradle.properties
Expand Down
14 changes: 9 additions & 5 deletions cronet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id "maven-publish"

id "com.android.library"
id "digital.wup.android-maven-publish"
}

description = "gRPC: Cronet Android"
Expand Down Expand Up @@ -35,6 +34,12 @@ android {
}
testOptions { unitTests { includeAndroidResources = true } }
lintOptions { disable 'InvalidPackage' }
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

dependencies {
Expand Down Expand Up @@ -83,10 +88,9 @@ task sourcesJar(type: Jar) {
publishing {
publications {
maven {
from components.android

artifact javadocJar
artifact sourcesJar
afterEvaluate {
from components.release
}
}
}
}
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pluginManagement {
id "com.google.cloud.tools.jib" version "3.3.1"
id "com.google.osdetector" version "1.7.1"
id "com.google.protobuf" version "0.9.1"
id "digital.wup.android-maven-publish" version "3.6.3"
id "me.champeau.gradle.japicmp" version "0.3.0"
id "me.champeau.jmh" version "0.6.8"
id "net.ltgt.errorprone" version "3.0.1"
Expand Down

0 comments on commit 0847e2b

Please sign in to comment.