name: "CodeQL Advanced" on: push: branches: [ "main" ] pull_request: branches: [ "main" ] schedule: - cron: '0 4 * * 0' jobs: analyze: name: Analyze (${{ matrix.language }}) runs-on: ubuntu-latest permissions: # required for all workflows security-events: write # required to fetch internal or private CodeQL packs packages: read # only required for workflows in private repositories actions: read contents: read strategy: matrix: language: [ java-kotlin ] steps: - name: Checkout repository uses: actions/checkout@v5 with: fetch-depth: 0 - uses: actions/setup-java@v5 with: distribution: temurin java-version: '21' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} build-mode: manual - uses: actions/cache@v4 with: path: | ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Build Kotlin sources run: | ./gradlew \ :kotlin-sdk-core:compileKotlinJvm \ :kotlin-sdk-client:compileKotlinJvm \ :kotlin-sdk-server:compileKotlinJvm \ :kotlin-sdk:compileKotlinJvm \ :kotlin-sdk-test:compileKotlinJvm \ -Pkotlin.incremental=false \ --no-daemon --stacktrace --rerun-tasks - name: Analyze uses: github/codeql-action/analyze@v3 with: category: '/language:${{ matrix.language }}'