diff --git a/.github/gradle-ci.properties b/.github/gradle-ci.properties deleted file mode 100644 index 3d87884da..000000000 --- a/.github/gradle-ci.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Copyright (c) SRG SSR. All rights reserved. -# License information is available from the LICENSE file. -# -org.gradle.daemon=false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0151e17ce..38167b9af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index c0ca27571..a26017251 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -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 diff --git a/.github/workflows/deploy_dokka_documentation.yml b/.github/workflows/deploy_dokka_documentation.yml index b5ba09cc8..042c5085c 100644 --- a/.github/workflows/deploy_dokka_documentation.yml +++ b/.github/workflows/deploy_dokka_documentation.yml @@ -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 diff --git a/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPublishingPlugin.kt b/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPublishingPlugin.kt index 04f40cc8d..e2f99e056 100644 --- a/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPublishingPlugin.kt +++ b/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPublishingPlugin.kt @@ -118,11 +118,11 @@ class PillarboxAndroidLibraryPublishingPlugin : Plugin { // Follow https://github.com/Kotlin/dokka/issues/3883 to see if it's necessary to duplicate this config pluginsConfiguration.getByName("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")) } } } diff --git a/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/internal/ProjectExtensions.kt b/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/internal/ProjectExtensions.kt index ea57ad27d..8d8a32b15 100644 --- a/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/internal/ProjectExtensions.kt +++ b/build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/internal/ProjectExtensions.kt @@ -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") } } diff --git a/build.gradle.kts b/build.gradle.kts index a0d95b63f..3755e1653 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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")) } } @@ -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") } diff --git a/dokka/Pillarbox.md b/config/dokka/Pillarbox.md similarity index 100% rename from dokka/Pillarbox.md rename to config/dokka/Pillarbox.md diff --git a/dokka/images/logo-icon.svg b/config/dokka/images/logo-icon.svg similarity index 100% rename from dokka/images/logo-icon.svg rename to config/dokka/images/logo-icon.svg diff --git a/dokka/styles/pillarbox.css b/config/dokka/styles/pillarbox.css similarity index 100% rename from dokka/styles/pillarbox.css rename to config/dokka/styles/pillarbox.css diff --git a/dokka/templates/includes/page_metadata.ftl b/config/dokka/templates/includes/page_metadata.ftl similarity index 100% rename from dokka/templates/includes/page_metadata.ftl rename to config/dokka/templates/includes/page_metadata.ftl diff --git a/git_hooks/pre-commit b/config/git/pre-commit similarity index 100% rename from git_hooks/pre-commit rename to config/git/pre-commit diff --git a/lint.xml b/config/lint/lint.xml similarity index 100% rename from lint.xml rename to config/lint/lint.xml