mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Ensure rootProject.name is only set from settings.gradle
I moved this assignment in0888dfbd05in 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 (cherry picked from commit9a79571284)
This commit is contained in:
parent
88cdbe52d7
commit
4d17a05b2b
3 changed files with 3 additions and 4 deletions
|
|
@ -21,8 +21,6 @@ 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')
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ apply plugin: 'maven-publish'
|
|||
apply from: "$gradle.ext.androidxMediaSettingsDir/missing_aar_type_workaround.gradle"
|
||||
|
||||
afterEvaluate {
|
||||
if (rootProject.name == gradle.ext.androidxMediaProjectName) {
|
||||
if (gradle.ext.has('rootProjectIsAndroidXMedia3') && gradle.ext.rootProjectIsAndroidXMedia3) {
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ if (gradle.ext.has('androidxMediaModulePrefix')) {
|
|||
modulePrefix += gradle.ext.androidxMediaModulePrefix
|
||||
}
|
||||
|
||||
gradle.ext.androidxMediaProjectName = 'androidx.media3'
|
||||
rootProject.name = 'androidx.media3'
|
||||
gradle.ext.rootProjectIsAndroidXMedia3 = true
|
||||
|
||||
include modulePrefix + 'demo'
|
||||
project(modulePrefix + 'demo').projectDir = new File(rootDir, 'demos/main')
|
||||
|
|
|
|||
Loading…
Reference in a new issue