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

Rename project ID #32

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
48 changes: 24 additions & 24 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,51 @@ subprojects {
apply<DokkaPlugin>()
apply<MavenPublishPlugin>()

group = "io.github.cleverlance.linguine"
version = System.getenv("NEXT_VERSION") ?: "0.2.0"
group = "com.qinshift.linguine"
version = System.getenv("NEXT_VERSION") ?: "0.3.0"

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
signAllPublications()

pom {
name = "Linguine"
description = "Simplifies the localization process in Kotlin projects."
inceptionYear = "2024"
url = "https://github.com/cleverlance/linguine/"
name.set("Linguine")
description.set("Simplifies the localization process in Kotlin projects.")
inceptionYear.set("2024")
url.set("https://github.com/cleverlance/linguine/")
licenses {
license {
name = "The MIT License"
url = "https://github.com/cleverlance/linguine/blob/main/license.md"
distribution = "https://github.com/cleverlance/linguine/blob/main/license.md"
name.set("The MIT License")
url.set("https://github.com/cleverlance/linguine/blob/main/license.md")
distribution.set("https://github.com/cleverlance/linguine/blob/main/license.md")
}
}
developers {
developer {
id = "RealDanie1"
name = "Daniel Pecuch"
url = "https://github.com/RealDanie1"
id.set("RealDanie1")
name.set("Daniel Pecuch")
url.set("https://github.com/RealDanie1")
}
developer {
id = "RadekKuzel"
name = "Radek Kůžel"
url = "https://github.com/RadekKuzel"
id.set("RadekKuzel")
name.set("Radek Kůžel")
url.set("https://github.com/RadekKuzel")
}
developer {
id = "JiriHromek"
name = "Jiří Hromek"
url = "https://github.com/JiriHromek"
id.set("JiriHromek")
name.set("Jiří Hromek")
url.set("https://github.com/JiriHromek")
}
developer {
id = "gerak-cz"
name = "Bořek Leikep"
url = "https://github.com/gerak-cz"
id.set("gerak-cz")
name.set("Bořek Leikep")
url.set("https://github.com/gerak-cz")
}
}
scm {
url = "https://github.com/cleverlance/linguine/"
connection = "scm:git:git://github.com/cleverlance/linguine.git"
developerConnection = "scm:git:ssh://[email protected]:cleverlance/linguine.git"
url.set("https://github.com/cleverlance/linguine/")
connection.set("scm:git:git://github.com/cleverlance/linguine.git")
developerConnection.set("scm:git:ssh://[email protected]:cleverlance/linguine.git")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions linguine-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ buildConfig {
gradlePlugin {
// Define the plugin
val linguine by plugins.creating {
id = "io.github.cleverlance.linguine"
implementationClass = "io.github.cleverlance.linguine.linguinegenerator.LinguinePlugin"
id = "com.qinshift.linguine"
implementationClass = "com.qinshift.linguine.linguinegenerator.LinguinePlugin"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import io.kotest.matchers.shouldBe
import kotlin.io.path.Path
import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down Expand Up @@ -34,7 +35,7 @@ class FileContentGeneratorTest {
val expected = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.String

public object Settings {
Expand Down Expand Up @@ -71,7 +72,7 @@ class FileContentGeneratorTest {
val expected = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.String

public object Section {
Expand Down Expand Up @@ -105,7 +106,7 @@ class FileContentGeneratorTest {
val expected = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.String

public object Deep {
Expand Down Expand Up @@ -142,7 +143,7 @@ class FileContentGeneratorTest {
val expected = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.String

public object Strings {
Expand Down Expand Up @@ -175,7 +176,7 @@ class FileContentGeneratorTest {
val expected = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.Int
import kotlin.String

Expand Down Expand Up @@ -221,7 +222,7 @@ class FileContentGeneratorTest {
val expected = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.String

public object Strings {
Expand Down Expand Up @@ -296,7 +297,7 @@ class FileContentGeneratorTest {
val expected = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.String

public object Strings {
Expand Down Expand Up @@ -366,31 +367,31 @@ class FileContentGeneratorTest {
generator.generateFileContent(outputDirectory.resolve("Strings.kt"), "Strings", root)

val expected = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.Float
import kotlin.Int
import kotlin.String

public object Strings {
public object Activation {
public object ForgottenPassword {
public object Birthdate {
public fun cancelButton(
param1: String,
param2: Int,
param3: Float,
param4: String,
param5: Int,
param6: Float,
): String = localise("activation__forgotten_password__birthdate__cancel_button",
param1, param2, param3, param4, param5, param6)
package presentation

import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.Float
import kotlin.Int
import kotlin.String

public object Strings {
public object Activation {
public object ForgottenPassword {
public object Birthdate {
public fun cancelButton(
param1: String,
param2: Int,
param3: Float,
param4: String,
param5: Int,
param6: Float,
): String = localise("activation__forgotten_password__birthdate__cancel_button",
param1, param2, param3, param4, param5, param6)
}
}
}
}
}
"""
assertEquals(expected.trimIndent(), result.trimIndent())
"""
result.trimIndent() shouldBe expected.trimIndent()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import io.kotest.matchers.shouldBe
import io.mockk.mockk
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import io.kotest.matchers.shouldBe
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import java.io.File
import java.nio.file.Paths
Expand All @@ -23,7 +23,7 @@ class LinguinePluginFunctionalTest {
writeText(
"""
plugins {
id("io.github.cleverlance.linguine")
id("com.qinshift.linguine")
}

linguineConfig {
Expand Down Expand Up @@ -56,9 +56,9 @@ class LinguinePluginFunctionalTest {
testProjectDir.resolve(gradleBuildFileName).apply {
writeText(
"""
plugins {
id("io.github.cleverlance.linguine")
}
plugins {
id("com.qinshift.linguine")
}

linguineConfig {
inputFilePath = "src/main/resources/strings.json"
Expand Down Expand Up @@ -101,7 +101,7 @@ class LinguinePluginFunctionalTest {
val expectedContent = """
package presentation

import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
import kotlin.Float
import kotlin.Int
import kotlin.String
Expand Down Expand Up @@ -144,7 +144,7 @@ class LinguinePluginFunctionalTest {
val buildScript =
"""
plugins {
id("io.github.cleverlance.linguine")
id("com.qinshift.linguine")
}

linguineConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator.filereader
package com.qinshift.linguine.linguinegenerator.filereader

import java.io.File
import org.gradle.internal.impldep.junit.framework.TestCase.assertEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import com.squareup.kotlinpoet.FileSpec
import com.squareup.kotlinpoet.FunSpec
Expand Down Expand Up @@ -29,7 +29,7 @@ class FileContentGenerator(
return FileSpec.builder(getFilePackage(filePath), fileName)
.indent(DEFAULT_INDENT)
.addImport(
"io.github.cleverlance.linguine.linguineruntime.presentation",
"com.qinshift.linguine.linguineruntime.presentation",
"Localiser.localise",
)
.addType(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

class FileParser(
private val fileContent: Map<String, String>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import java.io.File

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import io.github.cleverlance.linguine.linguinegenerator.filereader.FileType
import com.qinshift.linguine.linguinegenerator.filereader.FileType

open class LinguineConfig {
var inputFilePath: String = ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import io.github.cleverlance.linguine.linguinegenerator.filereader.FileType as LinguineFileType
import com.qinshift.linguine.linguinegenerator.filereader.FileType as LinguineFileType
import org.gradle.api.provider.Property as GradleProperty
import io.github.cleverlance.linguine.linguine_generator.BuildConfig
import io.github.cleverlance.linguine.linguinegenerator.filereader.FileReader
import com.qinshift.linguine.linguine_generator.BuildConfig
import com.qinshift.linguine.linguinegenerator.filereader.FileReader
import org.gradle.api.DefaultTask
import org.gradle.api.Plugin
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator.filereader
package com.qinshift.linguine.linguinegenerator.filereader

import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.qinshift.linguine.linguinegenerator.filereader

enum class FileType {
JSON
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguinegenerator
package com.qinshift.linguine.linguinegenerator

import org.gradle.api.Project
import org.gradle.testfixtures.ProjectBuilder
Expand All @@ -12,7 +12,7 @@ class LinguinePluginTest {
fun `plugin registers a task`() {
// Create a test project and apply the plugin
val project: Project = ProjectBuilder.builder().build()
project.plugins.apply("io.github.cleverlance.linguine")
project.plugins.apply("com.qinshift.linguine")
val extension = project.extensions.getByType(LinguineConfig::class.java)
extension.inputFilePath = "src/commonMain/resources/string.json"
extension.outputFilePath = "presentation"
Expand All @@ -25,7 +25,7 @@ class LinguinePluginTest {
fun `given configuration plugin should be configured`() {
val project: Project = ProjectBuilder.builder().build()

project.pluginManager.apply("io.github.cleverlance.linguine")
project.pluginManager.apply("com.qinshift.linguine")
val extension = project.extensions.getByType(LinguineConfig::class.java)
extension.inputFilePath = "src/commonMain/resources/string.json"
extension.outputFilePath = "presentation"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.qinshift.linguine.linguineruntime.presentation

internal data class Language(val code: String)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")

package io.github.cleverlance.linguine.linguineruntime.presentation
package com.qinshift.linguine.linguineruntime.presentation

internal expect object LanguageRepository {
fun load(): Language
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguineruntime.presentation
package com.qinshift.linguine.linguineruntime.presentation

import co.touchlab.kermit.Logger

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.cleverlance.linguine.linguineruntime.presentation
package com.qinshift.linguine.linguineruntime.presentation

import co.touchlab.kermit.Logger
import kotlin.native.concurrent.ThreadLocal
Expand Down
Loading