Skip to content

Commit

Permalink
Update the root project name check in publish.gradle
Browse files Browse the repository at this point in the history
The name was changed in androidx/media@2558138
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
  • Loading branch information
icbaker authored and tof-tof committed May 12, 2023
1 parent 5b68372 commit 4c1eb8a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core_settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ if (gradle.ext.has('androidxMediaModulePrefix')) {
modulePrefix += gradle.ext.androidxMediaModulePrefix
}

rootProject.name = gradle.ext.androidxMediaProjectName

include modulePrefix + 'lib-common'
project(modulePrefix + 'lib-common').projectDir = new File(rootDir, 'libraries/common')

Expand Down
2 changes: 1 addition & 1 deletion publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apply plugin: 'maven-publish'
apply from: "$gradle.ext.androidxMediaSettingsDir/missing_aar_type_workaround.gradle"

afterEvaluate {
if (rootProject.name == "media3") {
if (rootProject.name == gradle.ext.androidxMediaProjectName) {
publishing {
repositories {
maven {
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (gradle.ext.has('androidxMediaModulePrefix')) {
modulePrefix += gradle.ext.androidxMediaModulePrefix
}

rootProject.name = 'androidx.media3'
gradle.ext.androidxMediaProjectName = 'androidx.media3'

include modulePrefix + 'demo'
project(modulePrefix + 'demo').projectDir = new File(rootDir, 'demos/main')
Expand Down

0 comments on commit 4c1eb8a

Please sign in to comment.