diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2020-02-11 00:52:11 +0000 |
---|---|---|
committer | android-build-prod (mdb) <android-build-team-robot@google.com> | 2020-02-11 00:52:11 +0000 |
commit | 1e52644d3bbdf6307893d6b43e1dfa7716147f9f (patch) | |
tree | c776898a8ec70d85dda56ef865afb3eed6155001 | |
parent | b8b0dd98591746a15ad9a2ef1f44e95c280b0bb9 (diff) | |
parent | c71a361aeadb0284bcf09dacb830477db141ce9d (diff) | |
download | support-1e52644d3bbdf6307893d6b43e1dfa7716147f9f.tar.gz |
Merge cherrypicks of [1231350, 1231951, 1231952] into androidx-fragment-release
Change-Id: I472bd8ba2184313d5e363df6aeb45b58ccb14fcc
4 files changed, 21 insertions, 10 deletions
diff --git a/buildSrc/src/main/kotlin/androidx/build/CreateLibraryBuildInfoFileTask.kt b/buildSrc/src/main/kotlin/androidx/build/CreateLibraryBuildInfoFileTask.kt index e6da539d2d7..b22e4b831c5 100644 --- a/buildSrc/src/main/kotlin/androidx/build/CreateLibraryBuildInfoFileTask.kt +++ b/buildSrc/src/main/kotlin/androidx/build/CreateLibraryBuildInfoFileTask.kt @@ -69,14 +69,15 @@ open class CreateLibraryBuildInfoFileTask : DefaultTask() { } private fun getCommitShaAtHead(): String { - val commitList: List<Commit> = GitClientImpl(project.rootDir).getGitLog( + val supportRoot = getSupportRoot(project) + val commitList: List<Commit> = GitClientImpl(supportRoot, logger).getGitLog( GitCommitRange( fromExclusive = "", untilInclusive = "HEAD", n = 1 ), keepMerges = true, - fullProjectDir = project.projectDir + fullProjectDir = supportRoot ) return commitList.first().sha } diff --git a/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt b/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt index 02d629eec72..b6e1defcb43 100644 --- a/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt +++ b/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt @@ -58,7 +58,7 @@ object LibraryVersions { val EMOJI = Version("1.1.0-alpha01") val ENTERPRISE = Version("1.0.0-rc01") val EXIFINTERFACE = Version("1.2.0-alpha01") - val FRAGMENT = Version("1.2.1") + val FRAGMENT = Version("1.2.2") val FUTURES = Version("1.1.0-alpha01") val GRIDLAYOUT = Version("1.1.0-alpha01") val HEIFWRITER = Version("1.1.0-alpha01") diff --git a/buildSrc/src/main/kotlin/androidx/build/gitclient/GitClient.kt b/buildSrc/src/main/kotlin/androidx/build/gitclient/GitClient.kt index 356a32031ea..02572263711 100644 --- a/buildSrc/src/main/kotlin/androidx/build/gitclient/GitClient.kt +++ b/buildSrc/src/main/kotlin/androidx/build/gitclient/GitClient.kt @@ -151,6 +151,7 @@ class GitClientImpl( val bodyDelimiter: String = "_Body:" val localProjectDir: String = fullProjectDir.toString() .removePrefix(gitRoot.toString()) + val relativeProjectDir: String = fullProjectDir.relativeTo(workingDir).toString() var gitLogOptions: String = "--pretty=format:$commitStartDelimiter%n" + @@ -168,10 +169,10 @@ class GitClientImpl( if (gitCommitRange.fromExclusive != "") { gitLogCmd = "$GIT_LOG_CMD_PREFIX $gitLogOptions " + "${gitCommitRange.fromExclusive}..${gitCommitRange.untilInclusive}" + - " -- $fullProjectDir" + " -- ./$relativeProjectDir" } else { gitLogCmd = "$GIT_LOG_CMD_PREFIX $gitLogOptions ${gitCommitRange.untilInclusive} -n " + - "${gitCommitRange.n} -- $fullProjectDir" + "${gitCommitRange.n} -- ./$relativeProjectDir" } val gitLogString: String = commandRunner.execute(gitLogCmd) return parseCommitLogString( @@ -198,12 +199,21 @@ class GitClientImpl( .start() proc.waitFor(1, TimeUnit.MINUTES) - val response = proc + val stdout = proc .inputStream .bufferedReader() .readText() - logger?.info("Response: $response") - return response + val stderr = proc + .errorStream + .bufferedReader() + .readText() + val message = stdout + stderr + if (stderr != "") { + logger?.error("Response: $message") + } else { + logger?.info("Response: $message") + } + return stdout } override fun executeAndParse(command: String): List<String> { val response = execute(command) diff --git a/fragment/fragment/proguard-rules.pro b/fragment/fragment/proguard-rules.pro index f32fa56be7f..e5da11bd49e 100644 --- a/fragment/fragment/proguard-rules.pro +++ b/fragment/fragment/proguard-rules.pro @@ -13,7 +13,7 @@ # limitations under the License. # The default FragmentFactory creates Fragment instances using reflection --if public class ** implements androidx.fragment.app.Fragment --keep public class ** implements androidx.fragment.app.Fragment { +-if public class ** extends androidx.fragment.app.Fragment +-keep public class ** extends androidx.fragment.app.Fragment { public <init>(); } |