diff --git a/build-logic/src/main/kotlin/conventions.gradle.kts b/build-logic/src/main/kotlin/conventions.gradle.kts index 60ae764..3c3559d 100644 --- a/build-logic/src/main/kotlin/conventions.gradle.kts +++ b/build-logic/src/main/kotlin/conventions.gradle.kts @@ -12,7 +12,7 @@ plugins { val gitVersion: groovy.lang.Closure<*> by extra -group = "io.koalaql" +group = "com.github.tarcv" version = gitVersion() check("$version".isNotBlank() && version != "unspecified") diff --git a/kotbridge-plugin-gradle/build.gradle.kts b/kotbridge-plugin-gradle/build.gradle.kts index 7323410..052ff0e 100644 --- a/kotbridge-plugin-gradle/build.gradle.kts +++ b/kotbridge-plugin-gradle/build.gradle.kts @@ -20,13 +20,13 @@ gradlePlugin { vcsUrl.set("https://github.com/mfwgenerics/kapshot.git") plugins { - create("kapshotPlugin") { - id = "io.koalaql.kapshot-plugin" - displayName = "Kapshot Plugin" - description = "Kotlin Compiler Plugin for source capture in closure blocks" - implementationClass = "io.koalaql.kapshot.GradlePlugin" + create("kotbridgePlugin") { + id = "com.github.tarcv.kotbridge-plugin" + displayName = "Kotbridge Plugin" + description = "Kotlin Compiler Plugin for compiling source fragments as Kotlin/JS" + implementationClass = "com.github.tarcv.kotbridge.GradlePlugin" - tags.set(listOf("kotlin", "kapshot", "jvm")) + tags.set(listOf("kotlin", "kotbridge", "jvm")) } } } diff --git a/kotbridge-plugin-gradle/src/main/kotlin/com/github/tarcv/kotbridge/GradlePlugin.kt b/kotbridge-plugin-gradle/src/main/kotlin/com/github/tarcv/kotbridge/GradlePlugin.kt index f9172f2..afc19d3 100644 --- a/kotbridge-plugin-gradle/src/main/kotlin/com/github/tarcv/kotbridge/GradlePlugin.kt +++ b/kotbridge-plugin-gradle/src/main/kotlin/com/github/tarcv/kotbridge/GradlePlugin.kt @@ -1,6 +1,6 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge -import io.koalaql.kapshot_plugin_gradle.BuildConfig +import com.github.tarcv.kotbridge_plugin_gradle.BuildConfig import org.gradle.api.Project import org.gradle.api.provider.Provider import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation @@ -11,18 +11,18 @@ import org.jetbrains.kotlin.gradle.plugin.SubpluginOption class GradlePlugin : KotlinCompilerPluginSupportPlugin { override fun isApplicable(kotlinCompilation: KotlinCompilation<*>): Boolean = true - override fun getCompilerPluginId(): String = "io.koalaql.kapshot-plugin" + override fun getCompilerPluginId(): String = "com.github.tarcv.kotbridge-plugin" override fun getPluginArtifact(): SubpluginArtifact = SubpluginArtifact( - groupId = "io.koalaql", - artifactId = "kapshot-plugin-kotlin", + groupId = "com.github.tarcv", + artifactId = "kotbridge-plugin-kotlin", version = BuildConfig.VERSION ) override fun apply(target: Project) { /* make sure we don't try to add dependency until it has been configured by kotlin plugin */ target.plugins.withId("org.jetbrains.kotlin.jvm") { - target.dependencies.add("implementation", "io.koalaql:kapshot-runtime:${BuildConfig.VERSION}") + target.dependencies.add("implementation", "com.github.tarcv:kotbridge-runtime:${BuildConfig.VERSION}") } } diff --git a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/CaptureTransformer.kt b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/CaptureTransformer.kt index cc41c3a..975f6d4 100644 --- a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/CaptureTransformer.kt +++ b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/CaptureTransformer.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot.plugin +package com.github.tarcv.kotbridge.plugin import org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext @@ -47,9 +47,9 @@ class CaptureTransformer( private val projectDir: Path, private val extractedTargetDir: Path, private val addSourceToBlock: IrSimpleFunctionSymbol, - private val capturableFqn: String = "io.koalaql.kapshot.Capturable", - private val captureSourceFqn: String = "io.koalaql.kapshot.CaptureSource", - private val converterInfoFqn: String = "io.koalaql.kapshot.Converters" + private val capturableFqn: String = "com.github.tarcv.kotbridge.Capturable", + private val captureSourceFqn: String = "com.github.tarcv.kotbridge.CaptureSource", + private val converterInfoFqn: String = "com.github.tarcv.kotbridge.Converters" ): IrElementTransformerVoidWithContext() { private fun currentFileText(): String { diff --git a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/CliProcessor.kt b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/CliProcessor.kt index aacc288..815f305 100644 --- a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/CliProcessor.kt +++ b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/CliProcessor.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot.plugin +package com.github.tarcv.kotbridge.plugin import com.google.auto.service.AutoService import org.jetbrains.kotlin.compiler.plugin.AbstractCliOption @@ -10,7 +10,7 @@ import org.jetbrains.kotlin.config.CompilerConfiguration @AutoService(CommandLineProcessor::class) @OptIn(ExperimentalCompilerApi::class) class CliProcessor: CommandLineProcessor { - override val pluginId: String = "io.koalaql.kapshot-plugin" + override val pluginId: String = "com.github.tarcv.kotbridge-plugin" override val pluginOptions: Collection = listOf( CliOption( diff --git a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/EXTRACTED_DIR_KEY.kt b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/EXTRACTED_DIR_KEY.kt index 2311d51..ed274a8 100644 --- a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/EXTRACTED_DIR_KEY.kt +++ b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/EXTRACTED_DIR_KEY.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot.plugin +package com.github.tarcv.kotbridge.plugin import org.jetbrains.kotlin.config.CompilerConfigurationKey diff --git a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/GenerationExtension.kt b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/GenerationExtension.kt index f65226d..80ba39a 100644 --- a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/GenerationExtension.kt +++ b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/GenerationExtension.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot.plugin +package com.github.tarcv.kotbridge.plugin import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext @@ -17,7 +17,7 @@ class GenerationExtension( override fun generate(moduleFragment: IrModuleFragment, pluginContext: IrPluginContext) { val addSourceToBlock = pluginContext .referenceFunctions(CallableId( - packageName = FqName("io.koalaql.kapshot"), + packageName = FqName("com.github.tarcv.kotbridge"), callableName = Name.identifier("addSourceToBlock") )) .first() diff --git a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/PROJECT_DIR_KEY.kt b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/PROJECT_DIR_KEY.kt index 8f8f0f4..4c3f97c 100644 --- a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/PROJECT_DIR_KEY.kt +++ b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/PROJECT_DIR_KEY.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot.plugin +package com.github.tarcv.kotbridge.plugin import org.jetbrains.kotlin.config.CompilerConfigurationKey diff --git a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/Registrar.kt b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/Registrar.kt index 9fefbba..76a5ec9 100644 --- a/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/Registrar.kt +++ b/kotbridge-plugin-kotlin/src/main/kotlin/com/github/tarcv/kotbridge/plugin/Registrar.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot.plugin +package com.github.tarcv.kotbridge.plugin import com.google.auto.service.AutoService import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/Capturable.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/Capturable.kt index da9d6e7..52767a1 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/Capturable.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/Capturable.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge interface Capturable> { val source: Source get() = error("there is no source code for this block") diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CaptureSource.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CaptureSource.kt index bb8dbda..b319527 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CaptureSource.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CaptureSource.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge @Target( AnnotationTarget.CLASS, diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CapturedBlock.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CapturedBlock.kt index aca6d4c..94ff5dd 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CapturedBlock.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CapturedBlock.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge fun interface CapturedBlock: Capturable> { operator fun invoke(): T diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CapturedBlocks.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CapturedBlocks.kt index 7af4717..da8b26f 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CapturedBlocks.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/CapturedBlocks.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge fun parseLocation(location: String): SourceLocation { fun parseOffset(offset: String): SourceOffset = offset diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/KtJsNoImport.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/KtJsNoImport.kt index 98e5231..d42a7fe 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/KtJsNoImport.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/KtJsNoImport.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge /** * Ignore an annotated element when checking if it should be imported in a KtJs fragment diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/Source.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/Source.kt index 4de4796..af54e7e 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/Source.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/Source.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge class Source( val location: SourceLocation, diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/SourceLocation.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/SourceLocation.kt index f07fba5..09bfefd 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/SourceLocation.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/SourceLocation.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge class SourceLocation( val path: String, diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/SourceOffset.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/SourceOffset.kt index 47aed2e..64bf870 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/SourceOffset.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/SourceOffset.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge class SourceOffset( val char: Int, diff --git a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/sourceOf.kt b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/sourceOf.kt index 5421330..f30a946 100644 --- a/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/sourceOf.kt +++ b/kotbridge-runtime/src/main/kotlin/com/github/tarcv/kotbridge/sourceOf.kt @@ -1,4 +1,4 @@ -package io.koalaql.kapshot +package com.github.tarcv.kotbridge import kotlin.reflect.* diff --git a/settings.gradle.kts b/settings.gradle.kts index 7567667..aef1d6a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,9 +1,8 @@ pluginManagement { - includeBuild("kapshot-plugin-gradle") + includeBuild("kotbridge-plugin-gradle") } -includeBuild("kapshot-runtime") -includeBuild("kapshot-plugin-kotlin") +includeBuild("kotbridge-runtime") +includeBuild("kotbridge-plugin-kotlin") include("testing") -include("readme") diff --git a/testing/build.gradle.kts b/testing/build.gradle.kts index 91d6678..25fdcb8 100644 --- a/testing/build.gradle.kts +++ b/testing/build.gradle.kts @@ -6,7 +6,7 @@ import org.jetbrains.kotlin.incremental.createDirectory import org.jetbrains.kotlin.incremental.deleteDirectoryContents plugins { - id("io.koalaql.kapshot-plugin") + id("com.github.tarcv.kotbridge-plugin") kotlin("jvm") diff --git a/testing/src/test/kotlin/CaptureSourceTests.kt b/testing/src/test/kotlin/CaptureSourceTests.kt index f69ed08..a9c428c 100644 --- a/testing/src/test/kotlin/CaptureSourceTests.kt +++ b/testing/src/test/kotlin/CaptureSourceTests.kt @@ -1,5 +1,5 @@ -import io.koalaql.kapshot.CaptureSource -import io.koalaql.kapshot.sourceOf +import com.github.tarcv.kotbridge.CaptureSource +import com.github.tarcv.kotbridge.sourceOf import kotlin.test.Test import kotlin.test.assertEquals @@ -36,11 +36,11 @@ class CaptureSourceTests { assertEquals("src/test/kotlin/CaptureSourceTests.kt", location.path) - assertEquals(182, location.from.char) + assertEquals(198, location.from.char) assertEquals(7, location.from.line) assertEquals(4, location.from.column) - assertEquals(329, location.to.char) + assertEquals(345, location.to.char) assertEquals(14, location.to.line) assertEquals(5, location.to.column) diff --git a/testing/src/test/kotlin/CapturedBlockTests.kt b/testing/src/test/kotlin/CapturedBlockTests.kt index c78dc56..d391645 100644 --- a/testing/src/test/kotlin/CapturedBlockTests.kt +++ b/testing/src/test/kotlin/CapturedBlockTests.kt @@ -1,6 +1,6 @@ -import io.koalaql.kapshot.Capturable -import io.koalaql.kapshot.CapturedBlock -import io.koalaql.kapshot.Source +import com.github.tarcv.kotbridge.Capturable +import com.github.tarcv.kotbridge.CapturedBlock +import com.github.tarcv.kotbridge.Source import kotlinx.coroutines.runBlocking import org.junit.jupiter.api.Test import kotlin.coroutines.resume diff --git a/testing/src/test/kotlin/CapturedLocationTests.kt b/testing/src/test/kotlin/CapturedLocationTests.kt index 8c95080..2f90c45 100644 --- a/testing/src/test/kotlin/CapturedLocationTests.kt +++ b/testing/src/test/kotlin/CapturedLocationTests.kt @@ -1,4 +1,4 @@ -import io.koalaql.kapshot.CapturedBlock +import com.github.tarcv.kotbridge.CapturedBlock import org.junit.jupiter.api.Test import kotlin.test.assertEquals @@ -14,11 +14,11 @@ class CapturedLocationTests { assertEquals("2 + 2", block.source.text) assertEquals("src/test/kotlin/CapturedLocationTests.kt", location.path) - assertEquals(223, location.from.char) + assertEquals(231, location.from.char) assertEquals(12, location.from.column) assertEquals(8, location.from.line) - assertEquals(228, location.to.char) + assertEquals(236, location.to.char) assertEquals(17, location.to.column) assertEquals(8, location.to.line) } @@ -34,11 +34,11 @@ class CapturedLocationTests { assertEquals("", block.source.text) assertEquals("src/test/kotlin/CapturedLocationTests.kt", location.path) - assertEquals(763, location.from.char) + assertEquals(771, location.from.char) assertEquals(35, location.from.column) assertEquals(27, location.from.line) - assertEquals(763, location.to.char) + assertEquals(771, location.to.char) assertEquals(35, location.to.column) assertEquals(27, location.to.line) } @@ -52,11 +52,11 @@ class CapturedLocationTests { assertEquals("", block.source.text) assertEquals("src/test/kotlin/CapturedLocationTests.kt", location.path) - assertEquals(1303, location.from.char) + assertEquals(1311, location.from.char) assertEquals(35, location.from.column) assertEquals(47, location.from.line) - assertEquals(1303, location.to.char) + assertEquals(1311, location.to.char) assertEquals(35, location.to.column) assertEquals(47, location.to.line) } diff --git a/testing/src/test/kotlin/FrameworkExtensions.kt b/testing/src/test/kotlin/FrameworkExtensions.kt index f8e2c9f..65b4732 100644 --- a/testing/src/test/kotlin/FrameworkExtensions.kt +++ b/testing/src/test/kotlin/FrameworkExtensions.kt @@ -1,5 +1,5 @@ import com.microsoft.playwright.ElementHandle -import io.koalaql.kapshot.KtJsNoImport +import com.github.tarcv.kotbridge.KtJsNoImport import org.openqa.selenium.WebElement import org.w3c.dom.Node diff --git a/testing/src/test/kotlin/PlaywrightDemoTests.kt b/testing/src/test/kotlin/PlaywrightDemoTests.kt index f9acd83..6274704 100644 --- a/testing/src/test/kotlin/PlaywrightDemoTests.kt +++ b/testing/src/test/kotlin/PlaywrightDemoTests.kt @@ -4,9 +4,9 @@ import com.microsoft.playwright.ElementHandle import com.microsoft.playwright.Locator import com.microsoft.playwright.Page import com.microsoft.playwright.Playwright -import io.koalaql.kapshot.Capturable -import io.koalaql.kapshot.Converters -import io.koalaql.kapshot.Source +import com.github.tarcv.kotbridge.Capturable +import com.github.tarcv.kotbridge.Converters +import com.github.tarcv.kotbridge.Source import org.intellij.lang.annotations.Language import org.junit.jupiter.api.Test import org.w3c.dom.asList diff --git a/testing/src/test/kotlin/SeleniumDemoTests.kt b/testing/src/test/kotlin/SeleniumDemoTests.kt index bf64673..a7f443f 100644 --- a/testing/src/test/kotlin/SeleniumDemoTests.kt +++ b/testing/src/test/kotlin/SeleniumDemoTests.kt @@ -1,6 +1,6 @@ -import io.koalaql.kapshot.Capturable -import io.koalaql.kapshot.Converters -import io.koalaql.kapshot.Source +import com.github.tarcv.kotbridge.Capturable +import com.github.tarcv.kotbridge.Converters +import com.github.tarcv.kotbridge.Source import org.intellij.lang.annotations.Language import org.junit.jupiter.api.Test import org.openqa.selenium.By diff --git a/testing/src/test/kotlin/org/w3c/dom/SeleniumDomExtensions.kt b/testing/src/test/kotlin/org/w3c/dom/SeleniumDomExtensions.kt index 4c6fa13..69be4ae 100644 --- a/testing/src/test/kotlin/org/w3c/dom/SeleniumDomExtensions.kt +++ b/testing/src/test/kotlin/org/w3c/dom/SeleniumDomExtensions.kt @@ -5,7 +5,7 @@ ) package org.w3c.dom -import io.koalaql.kapshot.KtJsNoImport +import com.github.tarcv.kotbridge.KtJsNoImport // Stubs of kt/js only APIs