Commit Graph

21 Commits

Author SHA1 Message Date
ibaker 849238a52f Stop explicitly creating a `sourcesElement` Gradle variant
This variant has been superceded by an equivalent
`releaseVariantReleaseRuntimePublication` variant which (I think) has
been created since d5f9cf4f19.

Before this change the `sourcesElement` variant was being created with
no `files` config, which resulted in build failures when generating
javadoc in AndroidX:

```
However we cannot choose between the following variants of androidx.media3:media3-cast:1.2.0-alpha01:
  - releaseVariantReleaseSourcePublication
  - sourcesElement
```

We can resolve this confusion by deleting the empty & unneeded
`sourcesElement` variant.

#minor-release

PiperOrigin-RevId: 558783471
2023-08-22 15:34:20 +01:00
ibaker 9a79571284 Ensure `rootProject.name` is only set from `settings.gradle`
I moved this assignment in 0888dfbd05
in order to provide a single source-of-truth for `publish.gradle`,
but as pointed out in Issue: androidx/media#416 this breaks apps that are depending
on our project locally using the instructions we publish. Instead we can
remove the `rootProject.name` check from `publish.gradle`, and check an
explicit boolean value instead to indicate if the root project is 'ours'
(with this boolean only set from `settings.gradle`, so it doesn't get
picked up by apps depending on us locally).

#minor-release

PiperOrigin-RevId: 534459085
2023-05-24 16:01:43 +01:00
ibaker d5f9cf4f19 Add `singleVariant` publishing config to all published gradle files
Docs:
* https://developer.android.com/build/publish-library/configure-pub-variants#single-pub-var
* https://developer.android.com/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PublishingOptions

This resolves the following warning from Android Gradle Plugin 7.2.2 and
helps unblock the upgrade to AGP 8.0.1:

> Software Components will not be created automatically for Maven
> publishing from Android Gradle Plugin 8.0. To opt-in to the future
> behavior, set the Gradle property
> `android.disableAutomaticComponentCreation=true` in the
> `gradle.properties` file or use the new publishing DSL.
>
> Affected Modules: `lib-cast`, `lib-common`, `lib-container`,
> `lib-database`, `lib-datasource`, `lib-datasource-cronet`,
> `lib-datasource-okhttp`, `lib-datasource-rtmp`, `lib-decoder`,
> `lib-effect`, `lib-exoplayer`, `lib-exoplayer-all (legacy)`,
> `lib-exoplayer-dash`, `lib-exoplayer-hls`, `lib-exoplayer-ima`,
> `lib-exoplayer-rtsp`, `lib-exoplayer-smoothstreaming`,
> `lib-exoplayer-workmanager`, `lib-extractor`, `lib-media2 (legacy)`,
> `lib-mediasession (legacy)`, `lib-muxer`, `lib-session`,
> `lib-transformer`, `lib-ui`, `lib-ui-leanback`, `test-utils`,
> `test-utils-robolectric`

Issue: androidx/media#409
PiperOrigin-RevId: 533464133
2023-05-19 17:22:21 +01:00
ibaker 4c1eb8aec7 Update the root project name check in `publish.gradle`
The name was changed in 25581384e9
and this check wasn't updated, meaning publishing no longer worked
(it didn't publish anything, just printed lots of warnings like
`Skipping task ':test-utils-robolectric:publish' as it has no
actions.`). This change means the check is now using the same
source-of-truth as the root project name, so it shouldn't go out of
sync again.

#minor-release

PiperOrigin-RevId: 531457952
2023-05-12 13:19:17 +00:00
ibaker 50beec56f4 Add missing } to publish.gradle
This was missed in 47349b8c4b

#minor-release

PiperOrigin-RevId: 504548659
2023-01-25 18:46:26 +00:00
ibaker 47349b8c4b Publish gradle attributes for AndroidX compatibility
These attributes are required when importing our artifacts into
androidx-main in order to generate reference documentation (JavaDoc and
KDoc).

#minor-release

PiperOrigin-RevId: 504502555
2023-01-25 18:44:39 +00:00
yschimke 48aac9ba90 Disable publishing block when media3 included in another build.
From https://github.com/androidx/media/pull/127/files

PiperOrigin-RevId: 485921271
2022-11-08 11:27:48 +00:00
tonihei bf2c652b5f Add workaround for missing <type>aar</type> tags in POM
There is an open Gradle bug that dependencies with AARs are not marked
as such in the created POM files (https://github.com/gradle/gradle/issues/3170).

This causes issues building ExoPlayer with Maven POMs only.
(Issue: google/ExoPlayer#8353).

This change adds the workaround suggested on the Gradle bug until
the bug is fixed. As we have a mixture of JAR and AAR dependencies,
we need to maintain a lookup table to know which dependencies have AARs.
The current code throws when a new dependency is added and it's not
classified.

#minor-release

PiperOrigin-RevId: 417797407
2022-01-05 10:48:41 +00:00
Andrew Lewis 933e207b3e Update to androidx.media3
PiperOrigin-RevId: 405656499
2021-10-27 09:12:46 +01:00
olly d601875452 Rename releaseArtifact to releaseArtifactId
PiperOrigin-RevId: 404059404
2021-10-18 22:45:47 +01:00
andrewlewis 86a0a405b6 Update instructions for GMaven releasing
Issue: #5246

#minor-release

PiperOrigin-RevId: 366041182
2021-04-01 16:05:53 +01:00
andrewlewis aa2dc4c511 Lint and test artifacts for Maven publication
Issue: #5246
PiperOrigin-RevId: 360132205
2021-03-02 17:03:44 +00:00
andrewlewis e8b4986640 Fix publishing to bintray
The configuration to publish to Maven seems to be incompatible with the
configuration for bintray, so only enable one at once. Once the GMaven
publishing flow is completely set up we can remove the exoplayerPublishEnabled
constant and the first branch entirely.

Issue: #5246
PiperOrigin-RevId: 359056610
2021-02-23 16:53:14 +00:00
andrewlewis 7b119beffb Add Maven publishing support
The release AAR and Android sources are included for each published artifact.

Issue: #5246
Issue: #8353

#minor-release

PiperOrigin-RevId: 358146555
2021-02-19 10:57:57 +00:00
olly 31d20a9a97 Add missing file header
PiperOrigin-RevId: 257630168
2019-07-14 16:23:39 +01:00
aquilescanta 54abdfc85b Fix syntax error in publish.gradle
PiperOrigin-RevId: 257184313
2019-07-09 16:15:33 +01:00
Oliver Woodman 3ac8b6acee Merge pull request #5732 from ToxicBakery:feature/add-license-to-pom
PiperOrigin-RevId: 257138448
2019-07-09 08:50:01 +01:00
toxicbakery 70530cd1e6 #5731 Add license information to generated POM files 2019-04-08 13:26:05 -04:00
olly e716e315ff Update build tools for Android Studio 3.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190896757
2018-03-29 13:49:03 +01:00
olly 2a8eb5a2a1 Make it easier to use ExoPlayer modules in other projects
It's currently difficult to use ExoPlayer modules in other gradle
projects because they rely on constants and dependencies defined
in our own top level gradle file. This change moves the constants
into a separate file referenced directly from each module. It also
removes the need for the top level gradle file to declare a
dependency on com.novoda:bintray-release. This is now only needed
if "exoplayerPublishEnabled = true" is specified.

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160272072
2017-06-28 22:26:05 +01:00
olly d6db5066cd Improve publishing to Bintray
- Update bintray-release version
- Publish to exoplayer-test unless -PpublicRepo=true
- Publish GVR extension
- Minimize duplication with new publish.gradle

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150185740
2017-03-15 15:54:43 +00:00