Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to ksp 2 #28

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Build project
Expand Down
2 changes: 1 addition & 1 deletion .jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
jdk:
- openjdk11
- openjdk17
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import com.diffplug.gradle.spotless.SpotlessExtension

plugins {
id("org.jetbrains.kotlinx.kover") version "0.5.0"
id("com.diffplug.gradle.spotless") version "6.2.0" apply false
id("org.jetbrains.kotlin.jvm") version "1.7.22" apply false
id("org.jetbrains.kotlinx.kover") version "0.8.3"
id("com.diffplug.gradle.spotless") version "6.25.0" apply false
outadoc marked this conversation as resolved.
Show resolved Hide resolved
id("org.jetbrains.kotlin.jvm") version "2.0.0" apply false
}

subprojects {
Expand Down
5 changes: 3 additions & 2 deletions compiler-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand All @@ -6,8 +7,8 @@ plugins {
}

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

Expand Down
5 changes: 3 additions & 2 deletions compiler-factory/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand All @@ -6,8 +7,8 @@ plugins {
}

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ internal class FactoryGenerator(
}

FunSpec.builder("createInstance")
.addModifiers(KModifier.OVERRIDE)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.addParameter("scope", Scope::class)
.returns(sourceClassName)
.apply {
Expand Down Expand Up @@ -210,7 +210,7 @@ internal class FactoryGenerator(
private fun TypeSpec.Builder.emitGetTargetScope(): TypeSpec.Builder = apply {
val scopeName = constructorInjectionTarget.scopeName
FunSpec.builder("getTargetScope")
.addModifiers(KModifier.OVERRIDE)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.addParameter("scope", Scope::class)
.returns(Scope::class)
.addStatement(
Expand All @@ -236,7 +236,7 @@ internal class FactoryGenerator(
val scopeName = constructorInjectionTarget.scopeName
val hasScopeAnnotation = scopeName != null
FunSpec.builder("hasScopeAnnotation")
.addModifiers(KModifier.OVERRIDE)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.returns(Boolean::class)
.addStatement("return %L", hasScopeAnnotation)
.build()
Expand All @@ -245,7 +245,7 @@ internal class FactoryGenerator(

private fun TypeSpec.Builder.emitHasSingletonAnnotation(): TypeSpec.Builder = apply {
FunSpec.builder("hasSingletonAnnotation")
.addModifiers(KModifier.OVERRIDE)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.returns(Boolean::class)
.addStatement(
"return %L",
Expand All @@ -257,7 +257,7 @@ internal class FactoryGenerator(

private fun TypeSpec.Builder.emitHasReleasableAnnotation(): TypeSpec.Builder = apply {
FunSpec.builder("hasReleasableAnnotation")
.addModifiers(KModifier.OVERRIDE)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.returns(Boolean::class)
.addStatement(
"return %L",
Expand All @@ -269,7 +269,7 @@ internal class FactoryGenerator(

private fun TypeSpec.Builder.emitHasProvidesSingletonAnnotation(): TypeSpec.Builder = apply {
FunSpec.builder("hasProvidesSingletonAnnotation")
.addModifiers(KModifier.OVERRIDE)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.returns(Boolean::class)
.addStatement(
"return %L",
Expand All @@ -281,7 +281,7 @@ internal class FactoryGenerator(

private fun TypeSpec.Builder.emitHasProvidesReleasableAnnotation(): TypeSpec.Builder = apply {
FunSpec.builder("hasProvidesReleasableAnnotation")
.addModifiers(KModifier.OVERRIDE)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.returns(Boolean::class)
.addStatement(
"return %L",
Expand Down
5 changes: 3 additions & 2 deletions compiler-memberinjector/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand All @@ -6,8 +7,8 @@ plugins {
}

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ internal class MemberInjectorGenerator(
): TypeSpec.Builder = apply {
addFunction(
FunSpec.builder("inject")
.addModifiers(KModifier.OVERRIDE)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.addParameter("target", sourceClassName)
.addParameter("scope", Scope::class)
.apply {
Expand Down
Loading
Loading