Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into master
  • Loading branch information
i.khafizov committed Dec 2, 2022
2 parents 8172d89 + 8f5e190 commit ddebf39
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish_javadoc_to_github_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish javadoc to GitHub pages

on:
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Build javadoc
run: ./gradlew dokkaHtmlMultiModule
- name: Publish to GitHub pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/dokka
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
apply from: 'gradle/versions.gradle'

buildscript {
Expand Down Expand Up @@ -28,3 +29,7 @@ allprojects {
}
}
}

dokkaHtmlMultiModule.configure {
outputDirectory.set(new File("$buildDir/dokka"))
}
6 changes: 5 additions & 1 deletion cardio/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply from: '../gradle/dokka.gradle'
apply plugin: 'org.jetbrains.dokka'
apply from: rootProject.file('gradle/versions.gradle')
apply from: '../gradle/publish.gradle'

Expand All @@ -24,6 +24,10 @@ android {
}
}

tasks.dokkaHtmlPartial.configure {
outputDirectory = file("../build/dokka/cardio")
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
Expand Down
6 changes: 5 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'java'
apply plugin: 'kotlin'
apply from: '../gradle/dokka.gradle'
apply plugin: 'org.jetbrains.dokka'
apply from: '../gradle/versions.gradle'
apply from: '../gradle/publish.gradle'

Expand All @@ -11,6 +11,10 @@ repositories {
mavenCentral()
}

tasks.dokkaHtmlPartial.configure {
outputDirectory = file("../build/dokka/core")
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.squareup.okhttp3:okhttp:${okHttpVersion}"
Expand Down
4 changes: 4 additions & 0 deletions gradle/dokka.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ apply plugin: 'org.jetbrains.dokka'

tasks.dokkaHtml.configure {
outputDirectory = file("$buildDir/dokka")
}

tasks.dokkaHtmlPartial.configure {
outputDirectory = file("../dokka")
}
6 changes: 5 additions & 1 deletion ui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply from: '../gradle/dokka.gradle'
apply plugin: 'org.jetbrains.dokka'
apply from: rootProject.file('gradle/versions.gradle')
apply from: '../gradle/publish.gradle'

Expand Down Expand Up @@ -29,6 +29,10 @@ android {
}
}

tasks.dokkaHtmlPartial.configure {
outputDirectory = file("../build/dokka/ui")
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:$appCompatVersion"
Expand Down

0 comments on commit ddebf39

Please sign in to comment.