Skip to content

Upgrade to Gradle 4.8 #1350

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

Merged
merged 6 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 58 additions & 58 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import com.android.build.gradle.BaseExtension
import com.jfrog.bintray.gradle.BintrayExtension
import com.jfrog.bintray.gradle.RecordingCopyTask
import com.jfrog.bintray.gradle.tasks.RecordingCopyTask
import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention
import org.jfrog.gradle.plugin.artifactory.dsl.DoubleDelegateWrapper
import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
Expand Down Expand Up @@ -52,6 +52,10 @@ allprojects {
}
}

tasks.withType<Wrapper> {
distributionType = Wrapper.DistributionType.ALL
}

val Project.configDir get() = "$rootDir/library/quality"
val Project.reportsDir get() = "$buildDir/reports"

Expand Down Expand Up @@ -247,6 +251,50 @@ fun Project.setupPublishing() {
artifact(sourcesJar)

pom {
name.set("FirebaseUI ${project.name.capitalize()}")
description.set("Firebase UI for Android")
url.set("https://github.com/firebase/FirebaseUI-Android")

organization {
name.set("Firebase")
url.set("https://github.com/firebase")
}

scm {
val scmUrl = "scm:git:[email protected]/firebase/firebaseui-android.git"
connection.set(scmUrl)
developerConnection.set(scmUrl)
url.set([email protected])
tag.set("HEAD")
}

developers {
developer {
id.set("samtstern")
name.set("Sam Stern")
email.set("[email protected]")
organization.set("Firebase")
organizationUrl.set("https://firebase.google.com")
roles.set(listOf("Project-Administrator", "Developer"))
timezone.set("-8")
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lsirac If you can send me a developer DSL like this, I'll add you to the list too. 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW @lsirac totally optional, if you don't want to expose your email address or name you can skip.


developer {
id.set("SUPERCILEX")
name.set("Alex Saveau")
email.set("[email protected]")
roles.set(listOf("Developer"))
timezone.set("-8")
}
}

licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}

withXml {
asNode().appendNode("dependencies").apply {
fun Dependency.write(scope: String) = appendNode("dependency").apply {
Expand All @@ -267,54 +315,6 @@ fun Project.setupPublishing() {
dependency.write("runtime")
}
}

// Common values
val repoUrl = "https://github.com/firebase/FirebaseUI-Android"
val scmUrl = "scm:git:[email protected]/firebase/firebaseui-android.git"

// Name
asNode().appendNode("name", artifactId)

// Description
asNode().appendNode("description", "Firebase UI for Android")

// Organization
asNode().appendNode("organization").apply {
appendNode("name", "FirebaseUI")
appendNode("url", repoUrl)
}

// URL
asNode().appendNode("url", repoUrl)

// SCM
asNode().appendNode("scm").apply {
appendNode("connection", scmUrl)
appendNode("developerConnection", scmUrl)
appendNode("url", repoUrl)
appendNode("tag", "HEAD")
}

// Developers
asNode().appendNode("developers").appendNode("developer").apply {
appendNode("id", "samtstern")
appendNode("email", "[email protected]")
appendNode("organization", "Firebase")
appendNode("organizationUrl", "https://firebase.google.com")

appendNode("roles").apply {
appendNode("role", "Project-Administrator")
appendNode("role", "Developer")
}

appendNode("timezone", "-8")
}

// Licenses
asNode().appendNode("licenses").appendNode("license").apply {
appendNode("name", "The Apache License, Version 2.0")
appendNode("url", "http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
}
}
Expand Down Expand Up @@ -356,16 +356,16 @@ fun Project.setupPublishing() {
"'$name': ${publishing.artifacts}"
}
logger.info("""
|Bintray configuration for '$publicationName'
| Artifact name: $artifactName
| Artifacts: ${publications.joinToString(transform = pubLog)}
""".trimMargin())
|Bintray configuration for '$publicationName'
| Artifact name: $artifactName
| Artifacts: ${publications.joinToString(transform = pubLog)}
""".trimMargin())
logger.info("""
|POM transformation
| Src: $pomSrc
| Dest: $pomDest
| Name: $pomName
""".trimMargin())
|POM transformation
| Src: $pomSrc
| Dest: $pomDest
| Name: $pomName
""".trimMargin())

filesSpec(closureOf<RecordingCopyTask> {
from(pomSrc)
Expand Down
10 changes: 5 additions & 5 deletions buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object Config {
const val version = "4.0.1"
const val version = "4.1.0-SNAPSHOT"
val submodules = listOf("auth", "common", "firestore", "database", "storage")

private const val kotlinVersion = "1.2.41"
Expand All @@ -11,11 +11,11 @@ object Config {
}

object Plugins {
const val android = "com.android.tools.build:gradle:3.2.0-alpha15"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even notice that we had moved to alpha in the gradle --> kotlin switch. Is there anything more stable that will work for us?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was for lint to work. Also, we already shipped v4.0.1 without any problems so I wouldn't worry about it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhhhhhhhh, but I forgot that it will make it hard for people to use the sample 😕. Well unless we want to undo a few weeks of PRs, there's no going back. Sorry about that! 😊

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP let's just get onto a beta-or-better train as soon as one is available.

const val android = "com.android.tools.build:gradle:3.2.0-alpha17"
const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
const val google = "com.google.gms:google-services:4.0.1"

const val bintray = "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0"
const val bintray = "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1"
const val buildInfo = "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.3"
}

Expand All @@ -35,7 +35,7 @@ object Config {
const val cardView = "com.android.support:cardview-v7:$version"
const val customTabs = "com.android.support:customtabs:$version"

const val constraint = "com.android.support.constraint:constraint-layout:1.1.0"
const val constraint = "com.android.support.constraint:constraint-layout:1.1.1"
}

object Arch {
Expand Down Expand Up @@ -95,7 +95,7 @@ object Config {
}

object Lint {
private const val version = "26.2.0-alpha15"
private const val version = "26.2.0-alpha17"

const val api = "com.android.tools.lint:lint-api:$version"
const val tests = "com.android.tools.lint:lint-tests:$version"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So has the issue we had with 4.8 been fixed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, in bintray 1.8.1.

zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists