Android Studio Releases List: content reformatting

This commit is contained in:
Jakub Chrzanowski 2022-03-07 13:27:57 +01:00
parent 6aa0cb4040
commit 4f17e77a4b
No known key found for this signature in database
GPG Key ID: C39095BFD769862E
4 changed files with 71 additions and 72 deletions

View File

@ -27,6 +27,13 @@ val RELEASES_FILE_PATH_MD = "topics/_generated/android_studio_releases.md"
val RELEASES_FILE_PATH_XML = "topics/_generated/android_studio_releases.xml"
val INTELLIJ_RELEASES = "https://www.jetbrains.com/intellij-repository/releases/"
val ANDROID_STUDIO_HOST = "https://developer.android.com"
val CHANNEL_BADGES_LIST = """
[release]: https://img.shields.io/badge/-release-blue?style=flat-square
[patch]: https://img.shields.io/badge/-patch-orange?style=flat-square
[rc]: https://img.shields.io/badge/-rc-red?style=flat-square
[beta]: https://img.shields.io/badge/-beta-darkred?style=flat-square
[canary]: https://img.shields.io/badge/-canary-lightgrey?style=flat-square
"""
val platformBuildToVersionMapping = INTELLIJ_RELEASES.fetch { content ->
Jsoup.parse(content, "").select("h2:contains(com.jetbrains.intellij.idea) + table tbody tr").mapNotNull { tr ->
@ -80,25 +87,30 @@ frameUrl.fetch { content ->
}.also {
Persister().write(it, contentFile)
}.also { (_, items) ->
("" +
"""
("""
<chunk id="releases_table">
""".trimIndent() +
items.groupBy {
SemVer.parse(it.version).major
}.entries.joinToString("\n\n") { entry ->
""" + items.groupBy { SemVer.parse(it.version).major }.entries.joinToString("\n\n") {
"""
## ${entry.key}.x
## ${it.key}.x
${it.value.renderTable()}
"""
} + """
$CHANNEL_BADGES_LIST
</chunk>
<chunk id="releases_table_short">
${items.distinctBy(Item::version).take(5).renderTable()}
$CHANNEL_BADGES_LIST
</chunk>
""").split("\n").joinToString("\n", transform = String::trim).let(file(RELEASES_FILE_PATH_MD)::writeText)
}
}
fun List<Item>.renderTable() = """
| Release Name | Channel | Release Date | Version | IntelliJ IDEA Version |
|--------------|:-------:|--------------|---------|-----------------------|
""".trimIndent() + entry.value.sortedByDescending {
SemVer.parse(it.version)
}.joinToString("\n") {
""" + sortedByDescending { SemVer.parse(it.version) }.joinToString("\n") {
val name = it.name.removePrefix("Android Studio").trim()
val channel = it.channel.lowercase().run { "![$this][$this]" }
val date = it.date
@ -107,46 +119,6 @@ frameUrl.fetch { content ->
"| $name | $channel | $date | $version | $platform |"
}
} +
"""
[release]: https://img.shields.io/badge/-release-blue?style=flat-square
[patch]: https://img.shields.io/badge/-patch-orange?style=flat-square
[rc]: https://img.shields.io/badge/-rc-red?style=flat-square
[beta]: https://img.shields.io/badge/-beta-darkred?style=flat-square
[canary]: https://img.shields.io/badge/-canary-lightgrey?style=flat-square
</chunk>
<chunk id="releases_table_short">
| Release Name | Release Date | IntelliJ IDEA Version |
|--------------|--------------|-----------------------|
""".trimIndent() +
items.distinctBy { it.version }.take(5).joinToString("\n") {
val name = it.name.removePrefix("Android Studio").trim()
val platform = "${it.platformVersion} <small>(${it.platformBuild})</small>"
"| $name | ${it.date} | $platform |"
} +
"""
</chunk>
""".trimIndent()
).let {
file(RELEASES_FILE_PATH_MD).writeText(it)
}
}
}
fun <T> String.fetch(block: (String) -> T) = URL(this).openStream().use { inputStream ->
block(inputStream.readBytes().toString(Charsets.UTF_8))

View File

@ -1,7 +1,9 @@
<chunk id="releases_table">
## 2021.x
| Release Name | Channel | Release Date | Version | IntelliJ IDEA Version |
|--------------|:-------:|--------------|---------|-----------------------|
| Dolphin (2021.3.1) Canary 5 | ![canary][canary] | March 3, 2022 | <strong>2021.3.1</strong> <small>(AI-213.6777.52.2113.8233036)</small> | <strong>2021.3.2</strong> <small>(213.6777.52)</small> |
@ -42,8 +44,11 @@
| Bumblebee (2021.1.1) Canary 2 | ![canary][canary] | June 7, 2021 | <strong>2021.1.1</strong> <small>(AI-211.6222.4.2111.7407564)</small> | <strong>2020.3.4</strong> <small>(211.6222.4)</small> |
| Bumblebee (2021.1.1) Canary 1 | ![canary][canary] | May 18, 2021 | <strong>2021.1.1</strong> <small>(AI-203.7717.56.2111.7361063)</small> | <strong>2020.3.3</strong> <small>(203.7717.56)</small> |
## 2020.x
| Release Name | Channel | Release Date | Version | IntelliJ IDEA Version |
|--------------|:-------:|--------------|---------|-----------------------|
| Arctic Fox (2020.3.1) Patch 4 | ![patch][patch] | December 8, 2021 | <strong>2020.3.1</strong> <small>(AI-203.7717.56.2031.7935034)</small> | <strong>2020.3.3</strong> <small>(203.7717.56)</small> |
@ -73,8 +78,11 @@
| 2020.3.1 Canary 2 | ![canary][canary] | December 3, 2020 | <strong>2020.3.1</strong> <small>(AI-202.7319.50.2031.7006259)</small> | <strong>2020.2.2</strong> <small>(202.7319.50)</small> |
| 2020.3.1 Canary 1 | ![canary][canary] | December 1, 2020 | <strong>2020.3.1</strong> <small>(AI-202.7319.50.2031.6983675)</small> | <strong>2020.2.2</strong> <small>(202.7319.50)</small> |
## 4.x
| Release Name | Channel | Release Date | Version | IntelliJ IDEA Version |
|--------------|:-------:|--------------|---------|-----------------------|
| 4.2.2 | ![release][release] | June 30, 2021 | <strong>4.2.2</strong> <small>(AI-202.7660.26.42.7486908)</small> | <strong>2020.2.3</strong> <small>(202.7660.26)</small> |
@ -144,8 +152,11 @@
| 4.0 Canary 2 | ![canary][canary] | November 7, 2019 | <strong>4.0</strong> <small>(AI-192.6817.14.36.5984562)</small> | <strong>2019.2.3</strong> <small>(192.6817.14)</small> |
| 4.0 Canary 1 | ![canary][canary] | October 23, 2019 | <strong>4.0</strong> <small>(AI-192.6817.14.36.5959023)</small> | <strong>2019.2.3</strong> <small>(192.6817.14)</small> |
## 3.x
| Release Name | Channel | Release Date | Version | IntelliJ IDEA Version |
|--------------|:-------:|--------------|---------|-----------------------|
| 3.6.3 | ![release][release] | April 17, 2020 | <strong>3.6.3</strong> <small>(AI-192.7142.36.36.6392135)</small> | <strong>2019.2.4</strong> <small>(192.7142.36)</small> |
@ -310,8 +321,11 @@
| 3.0 Canary 2 | ![canary][canary] | May 26, 2017 | <strong>3.0</strong> <small>(AI-171.4041253)</small> | <strong>2017.1.0</strong> <small>(171.4041.0)</small> |
| 3.0 Canary 1 | ![canary][canary] | May 17, 2017 | <strong>3.0</strong> <small>(AI-171.4010489)</small> | <strong>2017.1.0</strong> <small>(171.4010.0)</small> |
## 2.x
| Release Name | Channel | Release Date | Version | IntelliJ IDEA Version |
|--------------|:-------:|--------------|---------|-----------------------|
| 2.4 Preview 7 | ![preview][preview] | April 28, 2017 | <strong>2.4</strong> <small>(AI-171.3934896)</small> | <strong>2017.1.0</strong> <small>(171.3934.0)</small> |
@ -321,23 +335,29 @@
| 2.3.3 | ![release][release] | June 8, 2017 | <strong>2.3.3</strong> <small>(AI-162.4069837)</small> | <strong>2016.2.5</strong> <small>(162.4069.0)</small> |
| 2.3.2 | ![release][release] | May 11, 2017 | <strong>2.3.2</strong> <small>(AI-162.3934792)</small> | <strong>2016.2.5</strong> <small>(162.3934.0)</small> |
[release]: https://img.shields.io/badge/-release-blue?style=flat-square
[patch]: https://img.shields.io/badge/-patch-orange?style=flat-square
[rc]: https://img.shields.io/badge/-rc-red?style=flat-square
[beta]: https://img.shields.io/badge/-beta-darkred?style=flat-square
[canary]: https://img.shields.io/badge/-canary-lightgrey?style=flat-square
</chunk>
<chunk id="releases_table_short">
| Release Name | Release Date | IntelliJ IDEA Version |
|--------------|--------------|-----------------------|
| Dolphin (2021.3.1) Canary 5 | March 3, 2022 | 2021.3.2 <small>(213.6777.52)</small> |
| Chipmunk (2021.2.1) Beta 3 | February 28, 2022 | 2021.2.4 <small>(212.5712.43)</small> |
| Bumblebee (2021.1.1) Patch 2 | February 23, 2022 | 2021.1.3 <small>(211.7628.21)</small> |
| Arctic Fox (2020.3.1) Patch 4 | December 8, 2021 | 2020.3.3 <small>(203.7717.56)</small> |
| 4.2.2 | June 30, 2021 | 2020.2.3 <small>(202.7660.26)</small> |
| Release Name | Channel | Release Date | Version | IntelliJ IDEA Version |
|--------------|:-------:|--------------|---------|-----------------------|
| Dolphin (2021.3.1) Canary 5 | ![canary][canary] | March 3, 2022 | <strong>2021.3.1</strong> <small>(AI-213.6777.52.2113.8233036)</small> | <strong>2021.3.2</strong> <small>(213.6777.52)</small> |
| Chipmunk (2021.2.1) Beta 3 | ![beta][beta] | February 28, 2022 | <strong>2021.2.1</strong> <small>(AI-212.5712.43.2112.8184640)</small> | <strong>2021.2.4</strong> <small>(212.5712.43)</small> |
| Bumblebee (2021.1.1) Patch 2 | ![patch][patch] | February 23, 2022 | <strong>2021.1.1</strong> <small>(AI-211.7628.21.2111.8193401)</small> | <strong>2021.1.3</strong> <small>(211.7628.21)</small> |
| Arctic Fox (2020.3.1) Patch 4 | ![patch][patch] | December 8, 2021 | <strong>2020.3.1</strong> <small>(AI-203.7717.56.2031.7935034)</small> | <strong>2020.3.3</strong> <small>(203.7717.56)</small> |
| 4.2.2 | ![release][release] | June 30, 2021 | <strong>4.2.2</strong> <small>(AI-202.7660.26.42.7486908)</small> | <strong>2020.2.3</strong> <small>(202.7660.26)</small> |
[release]: https://img.shields.io/badge/-release-blue?style=flat-square
[patch]: https://img.shields.io/badge/-patch-orange?style=flat-square
[rc]: https://img.shields.io/badge/-rc-red?style=flat-square
[beta]: https://img.shields.io/badge/-beta-darkred?style=flat-square
[canary]: https://img.shields.io/badge/-canary-lightgrey?style=flat-square
</chunk>

View File

@ -1,4 +1,4 @@
<content version="31">
<content version="69">
<item>
<name>Android Studio Dolphin (2021.3.1) Canary 5</name>
<build>AI-213.6777.52.2113.8233036</build>

View File

@ -2,4 +2,11 @@
<!-- Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
This page contains a complete list of the Android Studio releases with the relevant IntelliJ IDEA release version specified.
Android Studio releases are grouped by major versions.
Each entry specifies the exact release channel (like a canary, beta, RC, release, patch), release date, and exact IDE version with build number for the actual IDE and the IntelliJ IDEA platform that Android Studio is based on.
To get an insight on how to develop a plugin for Android Studio, visit the [Android Studio Plugin Development](android_studio.md) section.
<include src="android_studio_releases.md" include-id="releases_table"></include>