From bfa8800c0a131f3fbe66f25f36e9c176bbbb335a Mon Sep 17 00:00:00 2001 From: Yang Chen Date: Thu, 20 Feb 2020 20:27:37 +1100 Subject: [PATCH] Build website and generate API docs. --- .buildscript/deploy_website.sh | 51 ++++++++++++ .github/workflows/deploy-website.yml | 30 +++++++ .gitignore | 4 + _config.yml | 1 - build.gradle | 1 + buildSrc/dependencies.gradle | 1 + docs/images/reactive_cirrus_logo.png | Bin 0 -> 8811 bytes flowbinding-activity/build.gradle | 8 ++ flowbinding-android/build.gradle | 8 ++ flowbinding-appcompat/build.gradle | 8 ++ flowbinding-common/build.gradle | 8 ++ flowbinding-core/build.gradle | 8 ++ flowbinding-drawerlayout/build.gradle | 8 ++ flowbinding-lifecycle/build.gradle | 8 ++ flowbinding-material/build.gradle | 8 ++ flowbinding-navigation/build.gradle | 8 ++ flowbinding-preference/build.gradle | 8 ++ flowbinding-recyclerview/build.gradle | 8 ++ flowbinding-swiperefreshlayout/build.gradle | 8 ++ flowbinding-viewpager2/build.gradle | 8 ++ mkdocs.yml | 82 ++++++++++++++++++++ 21 files changed, 273 insertions(+), 1 deletion(-) create mode 100755 .buildscript/deploy_website.sh create mode 100644 .github/workflows/deploy-website.yml delete mode 100644 _config.yml create mode 100644 docs/images/reactive_cirrus_logo.png create mode 100644 mkdocs.yml diff --git a/.buildscript/deploy_website.sh b/.buildscript/deploy_website.sh new file mode 100755 index 000000000..8760f6e44 --- /dev/null +++ b/.buildscript/deploy_website.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +set -e + +REPO="git@github.com:ReactiveCircus/FlowBinding.git" +REMOTE_NAME="origin" +DIR=temp-clone + +if [ -n "${CI}" ]; then + REPO="https://github.com/${GITHUB_REPOSITORY}.git" +fi + +# Clone project into a temp directory +rm -rf $DIR +git clone "$REPO" $DIR +cd $DIR + +# Generate API docs +./gradlew dokka + +# Copy *.md files into docs directory +cp README.md docs/index.md +mkdir -p docs/flowbinding-android && cp flowbinding-android/README.md docs/flowbinding-android/index.md +mkdir -p docs/flowbinding-activity && cp flowbinding-activity/README.md docs/flowbinding-activity/index.md +mkdir -p docs/flowbinding-appcompat && cp flowbinding-appcompat/README.md docs/flowbinding-appcompat/index.md +mkdir -p docs/flowbinding-core && cp flowbinding-core/README.md docs/flowbinding-core/index.md +mkdir -p docs/flowbinding-drawerlayout && cp flowbinding-drawerlayout/README.md docs/flowbinding-drawerlayout/index.md +mkdir -p docs/flowbinding-lifecycle && cp flowbinding-lifecycle/README.md docs/flowbinding-lifecycle/index.md +mkdir -p docs/flowbinding-material && cp flowbinding-material/README.md docs/flowbinding-material/index.md +mkdir -p docs/flowbinding-navigation && cp flowbinding-navigation/README.md docs/flowbinding-navigation/index.md +mkdir -p docs/flowbinding-preference && cp flowbinding-preference/README.md docs/flowbinding-preference/index.md +mkdir -p docs/flowbinding-recyclerview && cp flowbinding-recyclerview/README.md docs/flowbinding-recyclerview/index.md +mkdir -p docs/flowbinding-swiperefreshlayout && cp flowbinding-swiperefreshlayout/README.md docs/flowbinding-swiperefreshlayout/index.md +mkdir -p docs/flowbinding-viewpager2 && cp flowbinding-viewpager2/README.md docs/flowbinding-viewpager2/index.md +cp CHANGELOG.md docs/changelog.md + +# If on CI, configure git remote with access token +if [ -n "${CI}" ]; then + REMOTE_NAME="https://x-access-token:${DEPLOY_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git remote add deploy "$REMOTE_NAME" + git fetch deploy && git fetch deploy gh-pages:gh-pages +fi + +# Build the website and deploy to GitHub Pages +mkdocs gh-deploy --remote-name "$REMOTE_NAME" + +# Delete temp directory +cd .. +rm -rf $DIR diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml new file mode 100644 index 000000000..22e1d6365 --- /dev/null +++ b/.github/workflows/deploy-website.yml @@ -0,0 +1,30 @@ +name: Deploy Website + +on: + push: + branches: + - master + paths: + - '**.md' + - 'mkdocs.yml' + +jobs: + deploy-website: + name: Generate API docs and deploy website + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: ${{ runner.os }}-gradle- + - run: | + pip3 install mkdocs mkdocs-material mkdocs-minify-plugin pymdown-extensions + .buildscript/deploy_website.sh + env: + CI: true + JAVA_TOOL_OPTIONS: -Xmx3g + GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process + DEPLOY_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }} diff --git a/.gitignore b/.gitignore index 3fe3a94fa..ebdc8948b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,7 @@ captures/ # External native build folder generated in Android Studio 2.2 and later .externalNativeBuild + +# Docs +site +docs/api diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c74188174..000000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-slate \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2bf2b6faa..bfa6385e1 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,7 @@ buildscript { classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${versions.detekt}" classpath "com.vanniktech:gradle-maven-publish-plugin:${versions.mavenPublishPlugin}" classpath "io.github.reactivecircus.firestorm:firestorm-gradle-plugin:${versions.firestormGradlePlugin}" + classpath("org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}") } } diff --git a/buildSrc/dependencies.gradle b/buildSrc/dependencies.gradle index 15425691e..8321450fb 100644 --- a/buildSrc/dependencies.gradle +++ b/buildSrc/dependencies.gradle @@ -3,6 +3,7 @@ rootProject.ext.versions = [ androidLint : '27.0.0-alpha09', mavenPublishPlugin : '0.9.0', firestormGradlePlugin: '0.1.1', + dokka : '0.10.1', kotlin : '1.3.61', detekt : '1.5.1', kotlinx : [ diff --git a/docs/images/reactive_cirrus_logo.png b/docs/images/reactive_cirrus_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ab132b9a2fd835828843fbb64385b5b9abbee83f GIT binary patch literal 8811 zcmY*?DdC<|P+Wx4sr574+Bu!dG+7LN#pIKZ(3Gd>!2&_SI0+a@!O*qPP+4AyzXfZToqkNg&S_w^qf*x+HGS4LZ zp7`-do;0aHuZhN1@p$l3D%6<6zt zmJd=0#9u%-PdWEA4oR)QcGGUT+{;zBWIgFBbeo(AvH#WWz9W3|jpzqPnF1MdeDo7~ zw%~yUe$VR2CkVi=nANKDN0a6PbAP0%9d9HF3HbKweM?~#NCL+Hfc9|!TI(oem2A|) zNBi>%g#0*9hgrI^Av-ynx*23v>U=IIL1E9gjvYp_5zfi>8D^X4ulyCK)V_AU7v=%- zBM235JN@yq@m&1I?(s9jm%}zkkbFN5%Ef0)dV3q>y8w+`0GTN#Po;zPWnu)2RIek> zU(z$+4JaVEV{2cA!C-wt_hXVf=@ z)^1S-vhVe$1WVWk8JDSHMV)u1_61@-3D;z8)5 zS#Z*xNzhI~9`i|>0@$QDGlrG9C+0)Ul+3eU6N}1{p$|sDJ2ITRqG5>RLEXmnD=O;- zEL*ohQpq%6;-!Zb$$a!Ek+glu^y&J8h))f_;KuF@JCOZ- zT{Bkvjd*c$K9sXy^RLhNYZ%tWJL(hndA^l@c;X!G<3)CBVMz{4>z#F}1iSA<_bX;- z+{%`;iOFgRRcpW}ZDh&Hp9PMMjmsj}jlzWU@!u`_Z`dDsDff@Uf?2v4T_!?piU`>I zglllP&sAC6r&&UM7a4P6Sa9)RZ{H`^OW923Dz{s3ykvRVfM2u7|&j?yju_OP4|TMyJR_EV7J8>6h=l$_hITO-gyL zdkxT?xur-jT=i#U%CA}tQmXlj39=UY1@)X(0!*{~jacuOf}$JxKP zrJHd|dE^?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Q=p^cgGh8k6vb}?@tBa#D6^_;` zEs7IA`%#3?4BcTgkFvm|<(o&fcjud0FVg997@OS9jz^M!+!)XWSvDZ^7ZZI|oIuU) z4!3ao4AU#0(xH+>I=q{D!j%tZ$B=-#i23zZuB=1HF4^M0Mbs!BjE=ZiM=53BSx9t> zVgh&YCPZxkIJi7NQy4~VuAMkOCPO=bQ^og6*zGg3lRV`g zXvua}=;C(zS%T`b`K0%m|L*jg##9$}>fkc6RpgSu)hSt z@)vX_?QOL}W07gGk(fw}Yeff3cV{y7b=bcM6HEYBGR(9piC8K&mggQz??e)kVKA1f zY0>BrfMW0R@1dsoutdEU5K0OW(aOuf+SaRgK6u;Bx{z*i{~PLZe&FoO<9gb#B_}^UPxp?~AGU?qb^eUa=b4T-h4gY}#J6UAcx#bPvDqcU#cg ze9;+W@pty z6ovLtB3BaEFRo-nvBzzH*wNa2YnQ-Y+!N9>(3#vJ}iiAcy55ea`k#M-U2}@|QDlTL6C+v*A2!8&4 zD*lzFm~3)kQ7#T*v$W5(9vEdW5k57}eM`cH2Mo;K+A{uFME-2JCu|p^Rh2|)lN&Da zD&01vY1ag#%uswwySkonXm~VoY6LMPkbq?aO*A#0+I*n2>HJ&oe6=Vnb-+OAtgV*BTu2nAK6PUh_p{&dyNyM$Nsll#AXgw8=U{b>{H>{fNzEkU>&5n97Yf;Jr zDMh(Xa^_n}!;#XLF!+)kqS_wA-I{qvckQ~6hqa62Ejb)VTmn%!bR0~=pKXjr&;c!a cHXeXd%}=!}p{VbVpGW|zN?MB5^6=pQ1Ei6z9{>OV literal 0 HcmV?d00001 diff --git a/flowbinding-activity/build.gradle b/flowbinding-activity/build.gradle index dff303a0d..d3d15d829 100644 --- a/flowbinding-activity/build.gradle +++ b/flowbinding-activity/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-android/build.gradle b/flowbinding-android/build.gradle index e4c3a1a69..e098e2687 100644 --- a/flowbinding-android/build.gradle +++ b/flowbinding-android/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-appcompat/build.gradle b/flowbinding-appcompat/build.gradle index 3e3cff99c..9c5d56f17 100644 --- a/flowbinding-appcompat/build.gradle +++ b/flowbinding-appcompat/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-common/build.gradle b/flowbinding-common/build.gradle index e04d5e7a8..32c41b6fe 100644 --- a/flowbinding-common/build.gradle +++ b/flowbinding-common/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-core/build.gradle b/flowbinding-core/build.gradle index 452107e46..c89d8faad 100644 --- a/flowbinding-core/build.gradle +++ b/flowbinding-core/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-drawerlayout/build.gradle b/flowbinding-drawerlayout/build.gradle index 21e599418..33309ced9 100644 --- a/flowbinding-drawerlayout/build.gradle +++ b/flowbinding-drawerlayout/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-lifecycle/build.gradle b/flowbinding-lifecycle/build.gradle index b50dd5c40..1ea26e89d 100644 --- a/flowbinding-lifecycle/build.gradle +++ b/flowbinding-lifecycle/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-material/build.gradle b/flowbinding-material/build.gradle index 11f88cc0d..3f9d66015 100644 --- a/flowbinding-material/build.gradle +++ b/flowbinding-material/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-navigation/build.gradle b/flowbinding-navigation/build.gradle index 107639f30..feaf97769 100644 --- a/flowbinding-navigation/build.gradle +++ b/flowbinding-navigation/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-preference/build.gradle b/flowbinding-preference/build.gradle index f631b3006..c9324c353 100644 --- a/flowbinding-preference/build.gradle +++ b/flowbinding-preference/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-recyclerview/build.gradle b/flowbinding-recyclerview/build.gradle index 08300341e..b06f0893d 100644 --- a/flowbinding-recyclerview/build.gradle +++ b/flowbinding-recyclerview/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-swiperefreshlayout/build.gradle b/flowbinding-swiperefreshlayout/build.gradle index 020920eae..d9b6f97de 100644 --- a/flowbinding-swiperefreshlayout/build.gradle +++ b/flowbinding-swiperefreshlayout/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/flowbinding-viewpager2/build.gradle b/flowbinding-viewpager2/build.gradle index 7723c3d7b..9ae112a8f 100644 --- a/flowbinding-viewpager2/build.gradle +++ b/flowbinding-viewpager2/build.gradle @@ -4,6 +4,14 @@ plugins { id 'kotlin-android' id 'com.vanniktech.maven.publish' id 'io.github.reactivecircus.firestorm' + id 'org.jetbrains.dokka' +} + +afterEvaluate { project -> + project.tasks.dokka { + outputDirectory = "$rootDir/docs/api" + outputFormat = 'gfm' + } } android { diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 000000000..f1b930ab6 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,82 @@ +site_name: 'FlowBinding' +site_description: "Kotlin Coroutines Flow binding APIs for Android's platform and unbundled UI widgets, inspired by RxBinding." +site_author: 'Yang Chen' +site_url: 'https://reactivecircus.github.io/FlowBinding' +remote_branch: gh-pages + +repo_name: 'FlowBinding' +repo_url: 'https://github.com/ReactiveCircus/FlowBinding' + +copyright: 'Copyright © 2019 Yang Chen' + +theme: + name: 'material' + language: 'en' + favicon: 'images/reactive_cirrus_logo.png' + logo: 'images/reactive_cirrus_logo.png' + palette: + primary: 'white' + accent: 'white' + font: + text: 'Fira Sans' + code: 'Fira Code' + +extra: + social: + - type: 'github' + link: 'https://github.com/ReactiveCircus/FlowBinding' + +nav: + - 'Overview': index.md + - 'Platform Bindings': flowbinding-android/index.md + - 'AndroidX Activity Bindings': flowbinding-activity/index.md + - 'AndroidX AppCompat Bindings': flowbinding-appcompat/index.md + - 'AndroidX Core Bindings': flowbinding-core/index.md + - 'AndroidX DrawerLayout Bindings': flowbinding-drawerlayout/index.md + - 'AndroidX Lifecycle Bindings': flowbinding-lifecycle/index.md + - 'AndroidX Navigation Component Bindings': flowbinding-navigation/index.md + - 'AndroidX Preference Bindings': flowbinding-preference/index.md + - 'AndroidX RecyclerView Bindings': flowbinding-recyclerview/index.md + - 'AndroidX SwipeRefreshLayout Bindings': flowbinding-swiperefreshlayout/index.md + - 'AndroidX ViewPager2 Bindings': flowbinding-viewpager2/index.md + - 'Material Components Bindings': flowbinding-material/index.md + - 'Change Log': changelog.md + - 'API': + - 'flowbinding-activity': api/flowbinding-activity/index.md + - 'flowbinding-android': api/flowbinding-android/index.md + - 'flowbinding-appcompat': api/flowbinding-appcompat/index.md + - 'flowbinding-common': api/flowbinding-common/index.md + - 'flowbinding-core': api/flowbinding-core/index.md + - 'flowbinding-drawerlayout': api/flowbinding-drawerlayout/index.md + - 'flowbinding-lifecycle': api/flowbinding-lifecycle/index.md + - 'flowbinding-material': api/flowbinding-material/index.md + - 'flowbinding-navigation': api/flowbinding-navigation/index.md + - 'flowbinding-preference': api/flowbinding-preference/index.md + - 'flowbinding-recyclerview': api/flowbinding-recyclerview/index.md + - 'flowbinding-swiperefreshlayout': api/flowbinding-swiperefreshlayout/index.md + - 'flowbinding-viewpager2': api/flowbinding-viewpager2/index.md + +markdown_extensions: + - admonition + - smarty + - codehilite: + guess_lang: false + linenums: True + - footnotes + - meta + - toc: + permalink: true + - pymdownx.betterem: + smart_enable: all + - pymdownx.caret + - pymdownx.details + - pymdownx.inlinehilite + - pymdownx.magiclink + - pymdownx.smartsymbols + - pymdownx.superfences + - tables + +plugins: + - search + - minify: + minify_html: true