Skip to content

Commit

Permalink
Move config files to the config folder (#795)
Browse files Browse the repository at this point in the history
Co-authored-by: Joaquim Stähli <[email protected]>
  • Loading branch information
MGaetan89 and StaehliJ authored Nov 20, 2024
1 parent 7ede973 commit 125e743
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 30 deletions.
5 changes: 0 additions & 5 deletions .github/gradle-ci.properties

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Build modules
run: ./gradlew :pillarbox-demo:assembleProdDebug :pillarbox-demo-cast:assembleDebug :pillarbox-demo-tv:assembleDebug :pillarbox-player-testutils:assembleDebug

Expand All @@ -51,8 +49,6 @@ jobs:
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Run Android Lint
run: ./gradlew :pillarbox-demo:lintProdDebug :pillarbox-demo-cast:lintDebug :pillarbox-demo-tv:lintDebug :pillarbox-player-testutils:lintDebug
- uses: github/codeql-action/upload-sarif@v3
Expand All @@ -78,8 +74,6 @@ jobs:
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Run Detekt
run: ./gradlew detekt
- uses: github/codeql-action/upload-sarif@v3
Expand All @@ -105,8 +99,6 @@ jobs:
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Run Dependency Analysis
run: ./gradlew buildHealth

Expand All @@ -129,8 +121,6 @@ jobs:
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Run Unit Tests
run: >
./gradlew
Expand Down Expand Up @@ -179,8 +169,6 @@ jobs:
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Run Android Tests
uses: reactivecircus/android-emulator-runner@v2
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Build project
run: ./gradlew :pillarbox-demo:assembleProdDebug :pillarbox-demo-tv:assembleDebug
2 changes: 0 additions & 2 deletions .github/workflows/deploy_dokka_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Build Dokka documentation
run: ./gradlew :dokkaGenerate
- name: Deploy Dokka documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ class PillarboxAndroidLibraryPublishingPlugin : Plugin<Project> {

// Follow https://github.com/Kotlin/dokka/issues/3883 to see if it's necessary to duplicate this config
pluginsConfiguration.getByName<DokkaHtmlPluginParameters>("html") {
customStyleSheets.from(rootProject.projectDir.resolve("dokka/styles/pillarbox.css"))
customStyleSheets.from(rootProject.projectDir.resolve("config/dokka/styles/pillarbox.css"))
footerMessage.set("© SRG SSR")
// TODO Enable this once we have some content there
// homepageLink.set("https://android.pillarbox.ch/")
templatesDir.set(rootProject.projectDir.resolve("dokka/templates"))
templatesDir.set(rootProject.projectDir.resolve("config/dokka/templates"))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ internal fun Project.configureAndroidLintModule(extension: CommonExtension<*, *,
abortOnError = true
checkAllWarnings = true
checkDependencies = true
lintConfig = rootProject.projectDir.resolve("config/lint/lint.xml")
sarifReport = true
sarifOutput = file("${rootProject.rootDir}/build/reports/android-lint/$name.sarif")
sarifOutput = rootProject.projectDir.resolve("build/reports/android-lint/$name.sarif")
disable.add("LogConditional")
}
}
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ dokka {
moduleVersion = providers.environmentVariable("VERSION_NAME").orElse("dev")

dokkaPublications.html {
includes.from("dokka/Pillarbox.md")
includes.from("config/dokka/Pillarbox.md")
}

pluginsConfiguration.html {
// See the overridable images here:
// https://github.com/Kotlin/dokka/tree/master/dokka-subprojects/plugin-base/src/main/resources/dokka/images
customAssets.from("dokka/images/logo-icon.svg") // TODO Use Pillarbox logo
customStyleSheets.from("dokka/styles/pillarbox.css")
customAssets.from("config/dokka/images/logo-icon.svg") // TODO Use Pillarbox logo
customStyleSheets.from("config/dokka/styles/pillarbox.css")
footerMessage.set("© SRG SSR")
// TODO Enable this once we have some content there
// homepageLink.set("https://android.pillarbox.ch/")
templatesDir.set(file("dokka/templates"))
templatesDir.set(file("config/dokka/templates"))
}
}

Expand Down Expand Up @@ -61,8 +61,8 @@ val clean by tasks.getting(Delete::class) {
*/
val installGitHook by tasks.registering(Copy::class) {
description = "Install the Git pre-commit hook locally"
from(file("${rootProject.rootDir}/git_hooks/pre-commit"))
into { file("${rootProject.rootDir}/.git/hooks") }
from(rootProject.projectDir.resolve("config/git/pre-commit"))
into { rootProject.projectDir.resolve(".git/hooks") }
filePermissions {
unix("rwxr-xr-x")
}
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 125e743

Please sign in to comment.