Skip to content

Bump com.squareup:kotlinpoet-ksp from 2.2.0 to 2.3.0 #80

Bump com.squareup:kotlinpoet-ksp from 2.2.0 to 2.3.0

Bump com.squareup:kotlinpoet-ksp from 2.2.0 to 2.3.0 #80

name: CI
on:
workflow_call:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
security-events: write
env:
JAVA_VERSION_BUILD: '25'
JAVA_VERSION_EXAMPLES: '17'
JAVA_DISTRIBUTION: 'temurin'
jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
outputs:
lazyval-version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_BUILD }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: maven
- name: Build and Install to Local Repository
run: ./mvnw -Pstatic-analysis --no-snapshot-updates --no-transfer-progress --batch-mode install --file pom.xml
- name: Upload Lazyval Artifacts
uses: actions/upload-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
retention-days: 1
- name: Upload Detekt SARIF
if: always() && !env.ACT # doesnt work locally
uses: github/codeql-action/upload-sarif@v4
with:
# currently error-prone does not support sarif, hence we only upload kotlin-detekt
# see https://github.com/google/error-prone/issues/3766
sarif_file: ksp/target/detekt.sarif
category: detekt
- name: Extract version to be used in examples
id: version
run: |
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Built Lazyval Version: $VERSION"
examples-java-maven:
name: Java-Example - Maven
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: 'maven'
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Create Maven 3 wrapper
working-directory: examples/java
run: mvn --no-transfer-progress -N wrapper:wrapper -Dmaven=3.9.12
- name: Run Java-Example with Maven
working-directory: examples/java
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile
- name: Uncomment type in source tree
working-directory: examples/java
# removes /* and */ from ProductName.java
run: sed -i '/^\/\*$/d; /^\*\/$/d' src/main/java/test/ProductName.java
- name: Run Incremental Compilation
working-directory: examples/java
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile
examples-java-maven-4:
name: Java-Example - Maven 4
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: 'maven'
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Create Maven 4 wrapper
working-directory: examples/java
run: mvn --no-transfer-progress -N wrapper:wrapper -Dmaven=4.0.0-rc-5
- name: Run Java-Example with Maven
working-directory: examples/java
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile -f pom-maven-4.xml
- name: Uncomment type in source tree
working-directory: examples/java
# removes /* and */ from ProductName.java
run: sed -i '/^\/\*$/d; /^\*\/$/d' src/main/java/test/ProductName.java
- name: Run Incremental Compilation
working-directory: examples/java
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile -f pom-maven-4.xml
examples-java-gradle:
name: Java-Example - Gradle
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: 'gradle'
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Run Java-Example with Gradle
working-directory: examples/java
run: gradle build -Dversion.lazyval=$VERSION_LAZYVAL
- name: Uncomment type in source tree
working-directory: examples/java
# removes /* and */ from ProductName.java
run: sed -i '/^\/\*$/d; /^\*\/$/d' src/main/java/test/ProductName.java
- name: Run Incremental Compilation
working-directory: examples/java
run: gradle build -Dversion.lazyval=$VERSION_LAZYVAL
examples-java-mill:
name: Java-Example - Mill
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- uses: coursier/cache-action@v7
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Download Mill Script
working-directory: examples/java
run: curl -L -s https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/${MILL_VERSION}/mill-dist-${MILL_VERSION}-mill.sh -o mill && chmod +x mill
env:
MILL_VERSION: 1.1.2
- name: Run Java-Example with Mill
working-directory: examples/java
run: ./mill --no-daemon -Dversion.lazyval=$VERSION_LAZYVAL __.compile
- name: Uncomment type in source tree
working-directory: examples/java
# removes /* and */ from ProductName.java
run: sed -i '/^\/\*$/d; /^\*\/$/d' src/main/java/test/ProductName.java
- name: Run Incremental Compilation
working-directory: examples/java
run: ./mill --no-daemon -Dversion.lazyval=$VERSION_LAZYVAL __.compile
examples-kotlin-maven:
name: Kotlin-Example - Maven
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: 'maven'
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Create Maven 3 wrapper
working-directory: examples/kotlin
run: mvn --no-transfer-progress -N wrapper:wrapper -Dmaven=3.9.12
- name: Run Java-Example with Maven
working-directory: examples/kotlin
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile
- name: Uncomment type in source tree
working-directory: examples/kotlin
# removes /* and */ from ProductName.kt
run: sed -i '/^\/\*$/d; /^\*\/$/d' src/main/kotlin/test/ProductName.kt
- name: Run Incremental Compilation
working-directory: examples/kotlin
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile
examples-kotlin-maven-4:
if: false # disabled due to maven-compiler-plugin 4-beta not seeing compiled kotlin classes
name: Kotlin-Example - Maven 4
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: 'maven'
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Create Maven 4 wrapper
working-directory: examples/kotlin
run: mvn --no-transfer-progress -N wrapper:wrapper -Dmaven=4.0.0-rc-5
- name: Run Java-Example with Maven
working-directory: examples/kotlin
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile -f pom-maven-4.xml
- name: Uncomment type in source tree
working-directory: examples/kotlin
# removes /* and */ from ProductName.kt
run: sed -i '/^\/\*$/d; /^\*\/$/d' src/main/kotlin/test/ProductName.kt
- name: Run Incremental Compilation
working-directory: examples/kotlin
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile -f pom-maven-4.xml
examples-kotlin-gradle:
name: Kotlin-Example - Gradle
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: 'gradle'
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Run Kotlin-Example with Gradle
working-directory: examples/kotlin
run: gradle build -Dversion.lazyval=$VERSION_LAZYVAL
- name: Uncomment type in source tree
working-directory: examples/kotlin
# removes /* and */ from ProductName.kt
run: sed -i '/^\/\*$/d; /^\*\/$/d' src/main/kotlin/test/ProductName.kt
- name: Run Incremental Compilation
working-directory: examples/kotlin
run: gradle build -Dversion.lazyval=$VERSION_LAZYVAL
examples-kotlin-mill:
name: Kotlin-Example - Mill
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- uses: coursier/cache-action@v7
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Download Mill Script
working-directory: examples/kotlin
run: curl -L -s https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/${MILL_VERSION}/mill-dist-${MILL_VERSION}-mill.sh -o mill && chmod +x mill
env:
MILL_VERSION: 1.1.0
- name: Run Kotlin-Example with Mill
working-directory: examples/kotlin
run: ./mill --no-daemon -Dversion.lazyval=$VERSION_LAZYVAL __.compile
- name: Uncomment type in source tree
working-directory: examples/kotlin
# removes /* and */ from ProductName.kt
run: sed -i '/^\/\*$/d; /^\*\/$/d' src/main/kotlin/test/ProductName.kt
- name: Run Incremental Compilation
working-directory: examples/kotlin
run: ./mill --no-daemon -Dversion.lazyval=$VERSION_LAZYVAL __.compile
examples-java-spi:
name: Java-Example - SPI-Dev
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Create Maven 3 wrapper
working-directory: examples/java-spi-dev
run: mvn --no-transfer-progress -N wrapper:wrapper -Dmaven=3.9.12
- name: Run Java-Example with Maven
working-directory: examples/java-spi-dev
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile
examples-kotlin-spi:
name: Kotlin-Example - SPI-Dev
needs: build
runs-on: ubuntu-latest
env:
VERSION_LAZYVAL: ${{ needs.build.outputs.lazyval-version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION_EXAMPLES }}
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION_EXAMPLES }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Download Lazyval Artifacts
uses: actions/download-artifact@v4
with:
name: maven-repo-lazyval
path: ~/.m2/repository/com/qualityminds/lazyval
- name: Create Maven 3 wrapper
working-directory: examples/kotlin-spi-dev
run: mvn --no-transfer-progress -N wrapper:wrapper -Dmaven=3.9.12
- name: Run Java-Example with Maven
working-directory: examples/kotlin-spi-dev
run: ./mvnw --no-snapshot-updates --no-transfer-progress --batch-mode -Dversion.lazyval=$VERSION_LAZYVAL compile