Skip to content

Commit 442bab2

Browse files
authored
Remove publish sources (#6427)
Per [b/377292172](https://b.corp.google.com/issues/377292172), This fixes the issue with source jars not being published. Android variants are configured at configuration time, but `withSourcesJar` is only a function. There's no way to provide a `Provider` to defer setting it. Attempting to instead call it after evaluation will result in it not actually being set. Previously, we published sources jars regardless if `publishSources` was set to false. Furthermore, no SDK actually had it set to false anyhow. So moving forward, I've just removed the setting entirely- as it wasn't really being used, it fixes our issue, and reduces maintenance costs. NO_RELEASE_CHANGE
1 parent 6383f6d commit 442bab2

File tree

46 files changed

+2
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2
-66
lines changed

appcheck/firebase-appcheck-debug-testing/firebase-appcheck-debug-testing.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ plugins {
2020
firebaseLibrary {
2121
libraryGroup = "appcheck"
2222
testLab.enabled = true
23-
publishSources = true
2423
releaseNotes {
2524
name.set("{{app_check}} Debug Testing")
2625
versionName.set("appcheck-debug-testing")

appcheck/firebase-appcheck-debug/firebase-appcheck-debug.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ plugins {
1818

1919
firebaseLibrary {
2020
libraryGroup = "appcheck"
21-
publishSources = true
2221
releaseNotes {
2322
name.set("{{app_check}} Debug")
2423
versionName.set("appcheck-debug")

appcheck/firebase-appcheck-interop/firebase-appcheck-interop.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ plugins {
1717
}
1818

1919
firebaseLibrary {
20-
publishSources = true
2120
publishJavadoc = false
2221
releaseNotes {
2322
enabled.set(false)

appcheck/firebase-appcheck-playintegrity/firebase-appcheck-playintegrity.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ plugins {
1818

1919
firebaseLibrary {
2020
libraryGroup = "appcheck"
21-
publishSources = true
2221
releaseNotes {
2322
name.set("{{app_check}} Play integrity")
2423
versionName.set("appcheck-playintegrity")

appcheck/firebase-appcheck/firebase-appcheck.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ plugins {
1919

2020
firebaseLibrary {
2121
libraryGroup = "appcheck"
22-
publishSources = true
2322
releaseNotes {
2423
name.set("{{app_check}}")
2524
versionName.set("appcheck")

appcheck/firebase-appcheck/ktx/ktx.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ firebaseLibrary {
2424
releaseNotes {
2525
enabled.set(false)
2626
}
27-
publishSources = true
2827
}
2928

3029
android {

buildSrc/src/main/java/com/google/firebase/gradle/plugins/BaseFirebaseLibraryPlugin.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ abstract class BaseFirebaseLibraryPlugin : Plugin<Project> {
5353
with(library) {
5454
previewMode.convention("")
5555
publishJavadoc.convention(true)
56-
publishSources.convention(true)
5756
artifactId.convention(project.name)
5857
groupId.convention(project.provider { project.group.toString() })
5958
libraryGroup.convention(artifactId)

buildSrc/src/main/java/com/google/firebase/gradle/plugins/FirebaseAndroidLibraryPlugin.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package com.google.firebase.gradle.plugins
1818

1919
import com.android.build.gradle.LibraryExtension
2020
import com.android.build.gradle.LibraryPlugin
21-
import com.android.build.gradle.internal.crash.afterEvaluate
2221
import com.google.firebase.gradle.plugins.LibraryType.ANDROID
2322
import com.google.firebase.gradle.plugins.ci.device.FirebaseTestServer
2423
import com.google.firebase.gradle.plugins.license.LicenseResolverPlugin
@@ -199,13 +198,8 @@ class FirebaseAndroidLibraryPlugin : BaseFirebaseLibraryPlugin() {
199198
firebaseLibrary: FirebaseLibraryExtension,
200199
android: LibraryExtension,
201200
) {
202-
android.publishing.singleVariant("release") {
203-
project.afterEvaluate {
204-
if (firebaseLibrary.publishSources.get()) {
205-
withSourcesJar()
206-
}
207-
}
208-
}
201+
android.publishing.singleVariant("release") { withSourcesJar() }
202+
209203
project.tasks.withType<GenerateModuleMetadata> { isEnabled = false }
210204

211205
configurePublishing(project, firebaseLibrary)

buildSrc/src/main/java/com/google/firebase/gradle/plugins/FirebaseLibraryExtension.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,6 @@ constructor(val project: Project, val type: LibraryType) {
6969
*/
7070
abstract val publishJavadoc: Property<Boolean>
7171

72-
/**
73-
* Publish source files for this library.
74-
*
75-
* Publishing sources alongside your standard `jar` or `aar` allows the IDE to offer better
76-
* auto-complete and inline linkage.
77-
*
78-
* If your SDK lives in the public repo, there's no real reason for you to have this disabled.
79-
*
80-
* Defaults to `true`.
81-
*
82-
* @see [FirebaseLibraryExtension]
83-
*/
84-
abstract val publishSources: Property<Boolean>
85-
8672
/**
8773
* Indicates the library is in a preview mode (such as `alpha` or `beta`).
8874
*

contributor-docs/onboarding/new_sdk.md

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)