Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/dependabot/fetch-m…
Browse files Browse the repository at this point in the history
…etadata-1.6.0
  • Loading branch information
erikeelde authored Jan 12, 2024
2 parents abebdc1 + cec504e commit 56fead5
Show file tree
Hide file tree
Showing 122 changed files with 2,367 additions and 920 deletions.
29 changes: 29 additions & 0 deletions .github/actions/version_information/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Generate version information"
description: "Generate version information and expose using outputs"

outputs:
mobile-version-code:
description: "Version code of application"
value: ${{ steps.mobile_version_code.outputs.mobile_version_code }}

mobile-version-name:
description: "Version name of application"
value: ${{ steps.mobile_version_name.outputs.mobile_version_name }}

runs:
using: "composite"
steps:
- name: "Generate versions"
id: version_code
run: ./scripts/generate_versions.sh
shell: bash

- name: "Get mobile version code"
id: mobile_version_code
run: echo "mobile_version_code=$(grep 'V_VERSION_CODE=' versions.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
shell: bash

- name: "Get mobile version name"
id: mobile_version_name
run: echo "mobile_version_name=$(grep 'V_VERSION=' versions.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
shell: bash
17 changes: 14 additions & 3 deletions .github/workflows/app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

Expand All @@ -28,8 +28,12 @@ jobs:
echo "${{ secrets.SERVICE_ACCOUNT }}" > service_account.json.asc
gpg -d --passphrase "${{ secrets.GPG_ENCRYPTION_KEY }}" --batch service_account.json.asc > service_account.json
- name: "Calculate build number"
id: version_information
uses: ./.github/actions/version_information

- name: Check out java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
Expand All @@ -46,3 +50,10 @@ jobs:
- name: Publish application
if: github.repository == 'erikeelde/toggles'
run: ./gradlew :toggles-app:publishReleaseBundle

- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: Apks
path: '**/build/outputs/*'
retention-days: 14
6 changes: 3 additions & 3 deletions .github/workflows/core-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Check out java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/flow-noop-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Check out java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/flow-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Check out java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Check out java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
Expand All @@ -37,7 +37,7 @@ jobs:
run: ./gradlew :toggles-app:packageDebug :toggles-sample:packageDebug

- name: Upload apks
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Apks
path: '**/build/outputs/apk/*'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prefs-noop-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Check out java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prefs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Check out java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Check out java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
Expand All @@ -30,11 +30,26 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run Checks
run: ./gradlew check :toggles-core:check :toggles-flow:check :toggles-flow-noop:check :toggles-prefs:check :toggles-prefs-noop:check
- name: Run app Checks
run: ./gradlew check

- name: Run core Checks
run: ./gradlew :toggles-core:check

- name: Run flow Checks
run: ./gradlew :toggles-flow:check --no-configuration-cache

- name: Run flow noop Checks
run: ./gradlew :toggles-flow-noop:check

- name: Run prefs Checks
run: ./gradlew :toggles-prefs:check --no-configuration-cache

- name: Run prefs noop Checks
run: ./gradlew :toggles-prefs-noop:check

- name: Upload reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: Reports
Expand Down
3 changes: 2 additions & 1 deletion build-logic/conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ java {

dependencies {
// implementation("gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.2")
implementation("se.premex:ownership-gradle-plugin:0.0.7")
implementation("se.premex:ownership-gradle-plugin:0.0.11")
implementation(libs.io.gitlab.arturbosch.detekt.detekt.gradle.plugin)
implementation(libs.com.android.tools.build.gradle)
implementation(libs.org.jetbrains.kotlin.kotlin.gradle.plugin)
implementation("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.9.10-1.0.13")

// https://github.com/gradle/gradle/issues/15383
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import org.gradle.accessors.dm.LibrariesForLibs
import org.gradle.kotlin.dsl.kotlin

Expand All @@ -6,19 +7,10 @@ val libs = the<LibrariesForLibs>()
plugins {
id("com.android.application")
kotlin("android")
kotlin("kapt")
id("kotlin-android")
id("toggles.detekt-conventions")
}

kapt {
javacOptions {
// Increase the max count of errors from annotation processors.
// Default is 100.
option("-Xmaxerrs", 500)
}
}

android {
compileSdk = 34

Expand All @@ -37,6 +29,7 @@ android {
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get()
}

@Suppress("UnstableApiUsage")
testOptions {
unitTests.isIncludeAndroidResources = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
}
}

java {
toolchain {
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_17.toString()))
vendor.set(JvmVendorSpec.AZUL)
}
Expand Down
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ plugins {
// https://github.com/Kotlin/KEEP/blob/master/proposals/explicit-api-mode.md
alias(libs.plugins.com.github.triplet.play) apply (false)
id("toggles.ownership-conventions")
alias(libs.plugins.com.google.devtools.ksp) apply false
alias(libs.plugins.com.autonomousapps.dependency.analysis)
}

fun isNonStable(version: String): Boolean {
Expand Down
1 change: 1 addition & 0 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
naming:
FunctionNaming:
ignoreAnnotated: ['Composable']

5 changes: 1 addition & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ android.enableJetifier=false

#kotlin.caching.enabled=true # default false
#kotlin.incremental.usePreciseJavaTracking=true #default false
#kapt.use.worker.api=true
#kapt.include.compile.classpath=false
#kapt.incremental.apt=true
#kotlin.parallel.tasks.in.project=true

org.gradle.caching=true
org.gradle.configuration-cache=false
org.gradle.configuration-cache=true
org.gradle.configuration-cache.max-problems=5
Loading

0 comments on commit 56fead5

Please sign in to comment.