Skip to content

Commit

Permalink
Merge pull request #181 from teogor/maintenance/dependencies-and-refa…
Browse files Browse the repository at this point in the history
…ctoring

Enhance Build Process and Documentation Management (CI, Linting, Docs)
  • Loading branch information
teogor authored Mar 4, 2024
2 parents eff1a89 + c47e38b commit 6e32c70
Show file tree
Hide file tree
Showing 31 changed files with 499 additions and 568 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/docs-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,13 @@ jobs:
distribution: temurin
java-version: 17

- name: Generate Backup's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :backup:dokkaHtmlMultiModule

- name: Generate Core's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :core:dokkaHtmlMultiModule

- name: Generate Data's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :data:dokkaHtmlMultiModule

- name: Generate Firebase's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :firebase:dokkaHtmlMultiModule

- name: Generate Framework's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :framework:dokkaHtmlMultiModule

- name: Generate Monetisation's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :monetisation:dokkaHtmlMultiModule

- name: Generate Navigation's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :navigation:dokkaHtmlMultiModule

- name: Generate Screen's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :screen:dokkaHtmlMultiModule

- name: Generate UI's API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' :ui:dokkaHtmlMultiModule
- name: Generate API Documentation
run: ./gradlew -D'org.gradle.unsafe.configuration-cache=false' dokkaHtmlMultiModule

- name: Relocate API References
run: |
mkdir -p build/docs/${{ env.REPOSITORY }}/reference
cp -r build/reference/* build/docs/${{ env.REPOSITORY }}/reference
mkdir -p build/docs/${{ env.REPOSITORY }}/html
cp -r build/reference/* build/docs/${{ env.REPOSITORY }}/html
- id: publish-docs
name: Deploy Documentation
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

- name: Cache Gradle and wrapper
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: gradle/[email protected]
- name: Make Gradle executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew build
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ render.experimental.xml
# IDEA/Android Studio project files, because
# the project can be imported from menu.gradle.kts
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries
.idea/*
!.idea/copyright
# Keep the code styles.
!/.idea/codeStyles
/.idea/codeStyles/*
!/.idea/codeStyles/Project.xml
!/.idea/codeStyles/codeStyleConfig.xml
!/.idea/icon.png
!/.idea/icon_dark.png
# Allow Project Icons
!.idea/icon.png
!.idea/icon_dark.png

/docs/dokka/

4 changes: 0 additions & 4 deletions .idea/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

153 changes: 0 additions & 153 deletions .idea/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/dictionaries/me.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/dictionaries/project_dictionary.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/misc.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package dev.teogor.ceres.feature.about

import android.os.Build
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -100,9 +101,11 @@ private fun AboutLayout() = LazyColumnLayoutBase(

// BuildConfigBet

aboutBuildDate(
BuildProfile.buildLocalDateTime,
)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
aboutBuildDate(
BuildProfile.buildLocalDateTime,
)
}

aboutHeaderAboutUs()

Expand Down
14 changes: 13 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import com.diffplug.spotless.LineEnding
import com.vanniktech.maven.publish.SonatypeHost
import dev.teogor.winds.api.MavenPublish
Expand Down Expand Up @@ -260,3 +259,16 @@ subprojects {
}
}
}


tasks.dokkaHtmlMultiModule {
dependsOn(":backup:dokkaHtmlMultiModule")
dependsOn(":core:dokkaHtmlMultiModule")
dependsOn(":data:dokkaHtmlMultiModule")
dependsOn(":firebase:dokkaHtmlMultiModule")
dependsOn(":framework:dokkaHtmlMultiModule")
dependsOn(":monetisation:dokkaHtmlMultiModule")
dependsOn(":navigation:dokkaHtmlMultiModule")
dependsOn(":screen:dokkaHtmlMultiModule")
dependsOn(":ui:dokkaHtmlMultiModule")
}
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }
querent = { id = "dev.teogor.querent", version.ref = "querent" }
# TODO: Temporary workaround until next release
# Use version 1.0.0-alpha03-SNAPSHOT-8f9a736 for the querent module
querent = { id = "dev.teogor.querent", version = "1.0.0-alpha03-SNAPSHOT-8f9a736" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
vanniktech-maven = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPlugin" }
winds = { id = "dev.teogor.winds", version.ref = "winds" }
Expand Down
Loading

0 comments on commit 6e32c70

Please sign in to comment.