-
-
Notifications
You must be signed in to change notification settings - Fork 133
fix: use Android flavors when appropriate. #1512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@JvmStatic val AGP_MAX = version("8.12.0") | ||
@JvmStatic val AGP_MAX = version("8.13.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, minimize annoying warning.
return if (withFlavor) { | ||
// debug + test => debugTest | ||
"$name${kindName.capitalizeSafely()}" | ||
} else { | ||
kindName | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix.
@@ -101,6 +101,7 @@ public class AndroidManifest(public val content: String) { | |||
@JvmField | |||
public val DEFAULT_APP: AndroidManifest = app(null) | |||
|
|||
// TODO: stop using package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up in separate PR.
d6d4ee2
to
f9f976f
Compare
Job Summary for GradleTest :: gradle |
@@ -225,7 +225,7 @@ internal class StandardTransform( | |||
advice += Advice.ofChange( | |||
coordinates = declarationCoordinates(theDecl), | |||
fromConfiguration = theDecl.configurationName, | |||
toConfiguration = usage.toConfiguration() | |||
toConfiguration = usage.toConfiguration(withFlavor = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this new parameter if test suite passes
@@ -440,20 +440,31 @@ internal class StandardTransform( | |||
} | |||
|
|||
/** e.g., "debug" + "implementation" -> "debugImplementation" */ | |||
private fun Usage.toConfiguration(forcedKind: SourceKind? = null): String { | |||
private fun Usage.toConfiguration(forcedKind: SourceKind? = null, withFlavor: Boolean = false): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this new parameter if test suite passes
check(bucket != Bucket.NONE) { "You cannot 'declare' an unused dependency" } | ||
|
||
fun processor() = if (isKaptApplied) "kapt" else "annotationProcessor" | ||
|
||
fun SourceKind.configurationNamePrefix(): String = when (kind) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup
Job Summary for GradleTest :: gradle |
Job Summary for GradleTest :: gradle |
Job Summary for GradleTest :: gradle |
407aa75
to
7d43077
Compare
// copied from StringsJVM.kt | ||
/** | ||
* TODO: Replace this with | ||
* `String.replaceFirstChar(Char::uppercase)` | ||
* | ||
* copied from StringsJVM.kt | ||
*/ | ||
@Deprecated("Replace with `String.replaceFirstChar(Char::uppercase)`") | ||
internal fun String.capitalizeSafely(locale: Locale = Locale.ROOT): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
followup
a40da43
to
c0c54bf
Compare
Resolves #1473