Skip to content

Commit

Permalink
Merge branch 'main' into kotlin-1.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMarquis committed Jul 7, 2023
2 parents cff7d56 + 53bc7cc commit fc69247
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
- name: Build
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: build --stacktrace
- name: Upload test results
Expand All @@ -29,7 +29,7 @@ jobs:
name: test-reports
path: processor/build/reports/tests/test
- name: Build Maven artifact
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: publishAllPublicationsToMavenLocalRepository --stacktrace
- name: Upload Maven artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dokka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
- name: Dokka
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: dokkaHtml
- uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
- name: Publish
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: publish
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish_to_repositories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
java-version: '17'
distribution: 'temurin'
- name: Build
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: build --stacktrace
- name: Publish to MavenLocal
if: ${{ inputs.MavenLocal }}
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: publishAllPublicationsToMavenLocalRepository
env:
Expand All @@ -51,7 +51,7 @@ jobs:
path: build/.m2/repository
- name: Publish to GitHub
if: ${{ inputs.GitHub }}
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: publishAllPublicationsToGitHubRepository
env:
Expand All @@ -60,7 +60,7 @@ jobs:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSWORD }}
- name: Publish to OSSRH
if: ${{ inputs.OSSRH }}
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2.4.2
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: publishAllPublicationsToOSSRHRepository
env:
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ktlint = "0.49.1"
[libraries]
junitApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junitRuntime = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
kotlinCompileTestingKsp = { module = "com.github.tschuchortdev:kotlin-compile-testing-ksp", version = "1.5.0" }
# https://github.com/ZacSweers/kotlin-compile-testing
kotlinCompileTestingKsp = { module = "dev.zacsweers.kctfork:ksp", version = "0.3.0" }
kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlinTest = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kspApi = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down
1 change: 1 addition & 0 deletions processor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ dependencies {
compileOnly(libs.kotlinReflect)
kspTest(projects.processor)
testRuntimeOnly(libs.junitRuntime)
testImplementation(libs.kspApi)
testImplementation(libs.kotlinTest)
testImplementation(libs.junitApi)
testImplementation(libs.kotlinCompileTestingKsp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ import com.tschuchort.compiletesting.kspWithCompilation
import com.tschuchort.compiletesting.symbolProcessorProviders
import fr.smarquis.sealed.SealedObjectInstances.RawType.Array
import fr.smarquis.sealed.SealedObjectInstances.RawType.List
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.junit.jupiter.api.Test
import java.io.File.separator
import kotlin.test.Ignore
import kotlin.test.assertContains
import kotlin.test.assertEquals

@OptIn(ExperimentalCompilerApi::class)
class CustomFileNameTest {

@SealedObjectInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ import com.tschuchort.compiletesting.KotlinCompilation.ExitCode
import com.tschuchort.compiletesting.SourceFile
import com.tschuchort.compiletesting.kspWithCompilation
import com.tschuchort.compiletesting.symbolProcessorProviders
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.junit.jupiter.api.Test
import kotlin.test.assertContains
import kotlin.test.assertEquals

@OptIn(ExperimentalCompilerApi::class)
class DuplicatedNamesTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@
*/
package fr.smarquis.sealed

import com.tschuchort.compiletesting.JvmCompilationResult
import com.tschuchort.compiletesting.KotlinCompilation
import com.tschuchort.compiletesting.KotlinCompilation.ExitCode
import com.tschuchort.compiletesting.SourceFile
import com.tschuchort.compiletesting.kspWithCompilation
import com.tschuchort.compiletesting.symbolProcessorProviders
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.junit.jupiter.api.Test
import kotlin.test.Ignore
import kotlin.test.assertEquals

@OptIn(ExperimentalCompilerApi::class)
class ReturnTypeTest {

@Test
Expand Down Expand Up @@ -97,6 +100,6 @@ class ReturnTypeTest {
inheritClassPath = true
}.compile()

private fun KotlinCompilation.Result.resolve(relative: String) =
private fun JvmCompilationResult.resolve(relative: String) =
outputDirectory.parentFile.resolve("ksp/sources/kotlin/$relative")
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ import com.tschuchort.compiletesting.KotlinCompilation.ExitCode
import com.tschuchort.compiletesting.SourceFile
import com.tschuchort.compiletesting.kspWithCompilation
import com.tschuchort.compiletesting.symbolProcessorProviders
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.junit.jupiter.api.Test
import kotlin.test.Ignore
import kotlin.test.assertContains
import kotlin.test.assertEquals

@OptIn(ExperimentalCompilerApi::class)
class SealedClassesNameCollisionTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ import com.tschuchort.compiletesting.kspWithCompilation
import com.tschuchort.compiletesting.symbolProcessorProviders
import fr.smarquis.sealed.SealedObjectInstances.Visibility.Internal
import fr.smarquis.sealed.SealedObjectInstances.Visibility.Public
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import kotlin.reflect.KVisibility.INTERNAL
import kotlin.reflect.KVisibility.PUBLIC
import kotlin.test.Test
import kotlin.test.assertContains
import kotlin.test.assertEquals

@OptIn(ExperimentalCompilerApi::class)
class VisibilityModifiersTest {

@SealedObjectInstances
Expand Down

0 comments on commit fc69247

Please sign in to comment.