Skip to content

Commit 6a6c191

Browse files
authored
Merge pull request #32 from Cleverlance/feature/renamed_id
Rename project ID
2 parents 2493556 + 4b503ee commit 6a6c191

File tree

27 files changed

+99
-98
lines changed

27 files changed

+99
-98
lines changed

build.gradle.kts

+24-24
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,51 @@ subprojects {
1515
apply<DokkaPlugin>()
1616
apply<MavenPublishPlugin>()
1717

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

2121
mavenPublishing {
2222
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
2323
signAllPublications()
2424

2525
pom {
26-
name = "Linguine"
27-
description = "Simplifies the localization process in Kotlin projects."
28-
inceptionYear = "2024"
29-
url = "https://github.com/cleverlance/linguine/"
26+
name.set("Linguine")
27+
description.set("Simplifies the localization process in Kotlin projects.")
28+
inceptionYear.set("2024")
29+
url.set("https://github.com/cleverlance/linguine/")
3030
licenses {
3131
license {
32-
name = "The MIT License"
33-
url = "https://github.com/cleverlance/linguine/blob/main/license.md"
34-
distribution = "https://github.com/cleverlance/linguine/blob/main/license.md"
32+
name.set("The MIT License")
33+
url.set("https://github.com/cleverlance/linguine/blob/main/license.md")
34+
distribution.set("https://github.com/cleverlance/linguine/blob/main/license.md")
3535
}
3636
}
3737
developers {
3838
developer {
39-
id = "RealDanie1"
40-
name = "Daniel Pecuch"
41-
url = "https://github.com/RealDanie1"
39+
id.set("RealDanie1")
40+
name.set("Daniel Pecuch")
41+
url.set("https://github.com/RealDanie1")
4242
}
4343
developer {
44-
id = "RadekKuzel"
45-
name = "Radek Kůžel"
46-
url = "https://github.com/RadekKuzel"
44+
id.set("RadekKuzel")
45+
name.set("Radek Kůžel")
46+
url.set("https://github.com/RadekKuzel")
4747
}
4848
developer {
49-
id = "JiriHromek"
50-
name = "Jiří Hromek"
51-
url = "https://github.com/JiriHromek"
49+
id.set("JiriHromek")
50+
name.set("Jiří Hromek")
51+
url.set("https://github.com/JiriHromek")
5252
}
5353
developer {
54-
id = "gerak-cz"
55-
name = "Bořek Leikep"
56-
url = "https://github.com/gerak-cz"
54+
id.set("gerak-cz")
55+
name.set("Bořek Leikep")
56+
url.set("https://github.com/gerak-cz")
5757
}
5858
}
5959
scm {
60-
url = "https://github.com/cleverlance/linguine/"
61-
connection = "scm:git:git://github.com/cleverlance/linguine.git"
62-
developerConnection = "scm:git:ssh://git@github.com:cleverlance/linguine.git"
60+
url.set("https://github.com/cleverlance/linguine/")
61+
connection.set("scm:git:git://github.com/cleverlance/linguine.git")
62+
developerConnection.set("scm:git:ssh://git@github.com:cleverlance/linguine.git")
6363
}
6464
}
6565
}

linguine-generator/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ buildConfig {
2222
gradlePlugin {
2323
// Define the plugin
2424
val linguine by plugins.creating {
25-
id = "io.github.cleverlance.linguine"
26-
implementationClass = "io.github.cleverlance.linguine.linguinegenerator.LinguinePlugin"
25+
id = "com.qinshift.linguine"
26+
implementationClass = "com.qinshift.linguine.linguinegenerator.LinguinePlugin"
2727
}
2828
}
2929

+32-31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
package io.github.cleverlance.linguine.linguinegenerator
1+
package com.qinshift.linguine.linguinegenerator
22

3+
import io.kotest.matchers.shouldBe
34
import kotlin.io.path.Path
45
import kotlin.test.Test
56
import kotlin.test.assertEquals
@@ -34,7 +35,7 @@ class FileContentGeneratorTest {
3435
val expected = """
3536
package presentation
3637
37-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
38+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
3839
import kotlin.String
3940
4041
public object Settings {
@@ -71,7 +72,7 @@ class FileContentGeneratorTest {
7172
val expected = """
7273
package presentation
7374
74-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
75+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
7576
import kotlin.String
7677
7778
public object Section {
@@ -105,7 +106,7 @@ class FileContentGeneratorTest {
105106
val expected = """
106107
package presentation
107108
108-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
109+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
109110
import kotlin.String
110111
111112
public object Deep {
@@ -142,7 +143,7 @@ class FileContentGeneratorTest {
142143
val expected = """
143144
package presentation
144145
145-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
146+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
146147
import kotlin.String
147148
148149
public object Strings {
@@ -175,7 +176,7 @@ class FileContentGeneratorTest {
175176
val expected = """
176177
package presentation
177178
178-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
179+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
179180
import kotlin.Int
180181
import kotlin.String
181182
@@ -221,7 +222,7 @@ class FileContentGeneratorTest {
221222
val expected = """
222223
package presentation
223224
224-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
225+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
225226
import kotlin.String
226227
227228
public object Strings {
@@ -296,7 +297,7 @@ class FileContentGeneratorTest {
296297
val expected = """
297298
package presentation
298299
299-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
300+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
300301
import kotlin.String
301302
302303
public object Strings {
@@ -366,31 +367,31 @@ class FileContentGeneratorTest {
366367
generator.generateFileContent(outputDirectory.resolve("Strings.kt"), "Strings", root)
367368

368369
val expected = """
369-
package presentation
370-
371-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
372-
import kotlin.Float
373-
import kotlin.Int
374-
import kotlin.String
375-
376-
public object Strings {
377-
public object Activation {
378-
public object ForgottenPassword {
379-
public object Birthdate {
380-
public fun cancelButton(
381-
param1: String,
382-
param2: Int,
383-
param3: Float,
384-
param4: String,
385-
param5: Int,
386-
param6: Float,
387-
): String = localise("activation__forgotten_password__birthdate__cancel_button",
388-
param1, param2, param3, param4, param5, param6)
370+
package presentation
371+
372+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
373+
import kotlin.Float
374+
import kotlin.Int
375+
import kotlin.String
376+
377+
public object Strings {
378+
public object Activation {
379+
public object ForgottenPassword {
380+
public object Birthdate {
381+
public fun cancelButton(
382+
param1: String,
383+
param2: Int,
384+
param3: Float,
385+
param4: String,
386+
param5: Int,
387+
param6: Float,
388+
): String = localise("activation__forgotten_password__birthdate__cancel_button",
389+
param1, param2, param3, param4, param5, param6)
390+
}
389391
}
390392
}
391393
}
392-
}
393-
"""
394-
assertEquals(expected.trimIndent(), result.trimIndent())
394+
"""
395+
result.trimIndent() shouldBe expected.trimIndent()
395396
}
396397
}

linguine-generator/src/functionalTest/kotlin/io/github/cleverlance/linguine/linguinegenerator/FileParserTest.kt linguine-generator/src/functionalTest/kotlin/com/qinshift/linguine/linguinegenerator/FileParserTest.kt

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

33
import io.kotest.matchers.shouldBe
44
import io.mockk.mockk

linguine-generator/src/functionalTest/kotlin/io/github/cleverlance/linguine/linguinegenerator/FileWriterTest.kt linguine-generator/src/functionalTest/kotlin/com/qinshift/linguine/linguinegenerator/FileWriterTest.kt

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

33
import io.kotest.matchers.shouldBe
44
import java.io.File
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.cleverlance.linguine.linguinegenerator
1+
package com.qinshift.linguine.linguinegenerator
22

33
import java.io.File
44
import java.nio.file.Paths
@@ -23,7 +23,7 @@ class LinguinePluginFunctionalTest {
2323
writeText(
2424
"""
2525
plugins {
26-
id("io.github.cleverlance.linguine")
26+
id("com.qinshift.linguine")
2727
}
2828
2929
linguineConfig {
@@ -56,9 +56,9 @@ class LinguinePluginFunctionalTest {
5656
testProjectDir.resolve(gradleBuildFileName).apply {
5757
writeText(
5858
"""
59-
plugins {
60-
id("io.github.cleverlance.linguine")
61-
}
59+
plugins {
60+
id("com.qinshift.linguine")
61+
}
6262
6363
linguineConfig {
6464
inputFilePath = "src/main/resources/strings.json"
@@ -101,7 +101,7 @@ class LinguinePluginFunctionalTest {
101101
val expectedContent = """
102102
package presentation
103103
104-
import io.github.cleverlance.linguine.linguineruntime.presentation.Localiser.localise
104+
import com.qinshift.linguine.linguineruntime.presentation.Localiser.localise
105105
import kotlin.Float
106106
import kotlin.Int
107107
import kotlin.String
@@ -144,7 +144,7 @@ class LinguinePluginFunctionalTest {
144144
val buildScript =
145145
"""
146146
plugins {
147-
id("io.github.cleverlance.linguine")
147+
id("com.qinshift.linguine")
148148
}
149149
150150
linguineConfig {
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.cleverlance.linguine.linguinegenerator.filereader
1+
package com.qinshift.linguine.linguinegenerator.filereader
22

33
import java.io.File
44
import org.gradle.internal.impldep.junit.framework.TestCase.assertEquals

linguine-generator/src/main/kotlin/io/github/cleverlance/linguine/linguinegenerator/FileContentGenerator.kt linguine-generator/src/main/kotlin/com/qinshift/linguine/linguinegenerator/FileContentGenerator.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.cleverlance.linguine.linguinegenerator
1+
package com.qinshift.linguine.linguinegenerator
22

33
import com.squareup.kotlinpoet.FileSpec
44
import com.squareup.kotlinpoet.FunSpec
@@ -29,7 +29,7 @@ class FileContentGenerator(
2929
return FileSpec.builder(getFilePackage(filePath), fileName)
3030
.indent(DEFAULT_INDENT)
3131
.addImport(
32-
"io.github.cleverlance.linguine.linguineruntime.presentation",
32+
"com.qinshift.linguine.linguineruntime.presentation",
3333
"Localiser.localise",
3434
)
3535
.addType(

linguine-generator/src/main/kotlin/io/github/cleverlance/linguine/linguinegenerator/FileParser.kt linguine-generator/src/main/kotlin/com/qinshift/linguine/linguinegenerator/FileParser.kt

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

33
class FileParser(
44
private val fileContent: Map<String, String>,

linguine-generator/src/main/kotlin/io/github/cleverlance/linguine/linguinegenerator/FileWriter.kt linguine-generator/src/main/kotlin/com/qinshift/linguine/linguinegenerator/FileWriter.kt

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

33
import java.io.File
44

linguine-generator/src/main/kotlin/io/github/cleverlance/linguine/linguinegenerator/LinguineConfig.kt linguine-generator/src/main/kotlin/com/qinshift/linguine/linguinegenerator/LinguineConfig.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package io.github.cleverlance.linguine.linguinegenerator
1+
package com.qinshift.linguine.linguinegenerator
22

3-
import io.github.cleverlance.linguine.linguinegenerator.filereader.FileType
3+
import com.qinshift.linguine.linguinegenerator.filereader.FileType
44

55
open class LinguineConfig {
66
var inputFilePath: String = ""

linguine-generator/src/main/kotlin/io/github/cleverlance/linguine/linguinegenerator/LinguinePlugin.kt linguine-generator/src/main/kotlin/com/qinshift/linguine/linguinegenerator/LinguinePlugin.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package io.github.cleverlance.linguine.linguinegenerator
1+
package com.qinshift.linguine.linguinegenerator
22

3-
import io.github.cleverlance.linguine.linguinegenerator.filereader.FileType as LinguineFileType
3+
import com.qinshift.linguine.linguinegenerator.filereader.FileType as LinguineFileType
44
import org.gradle.api.provider.Property as GradleProperty
5-
import io.github.cleverlance.linguine.linguine_generator.BuildConfig
6-
import io.github.cleverlance.linguine.linguinegenerator.filereader.FileReader
5+
import com.qinshift.linguine.linguine_generator.BuildConfig
6+
import com.qinshift.linguine.linguinegenerator.filereader.FileReader
77
import org.gradle.api.DefaultTask
88
import org.gradle.api.Plugin
99
import org.gradle.api.Project

linguine-generator/src/main/kotlin/io/github/cleverlance/linguine/linguinegenerator/filereader/FileReader.kt linguine-generator/src/main/kotlin/com/qinshift/linguine/linguinegenerator/filereader/FileReader.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.cleverlance.linguine.linguinegenerator.filereader
1+
package com.qinshift.linguine.linguinegenerator.filereader
22

33
import com.google.gson.Gson
44
import com.google.gson.reflect.TypeToken
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.qinshift.linguine.linguinegenerator.filereader
2+
3+
enum class FileType {
4+
JSON
5+
}

linguine-generator/src/main/kotlin/io/github/cleverlance/linguine/linguinegenerator/filereader/FileType.kt

-5
This file was deleted.

linguine-generator/src/test/kotlin/io/github/cleverlance/linguine/linguinegenerator/LinguinePluginTest.kt linguine-generator/src/test/kotlin/com/qinshift/linguine/linguinegenerator/LinguinePluginTest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.cleverlance.linguine.linguinegenerator
1+
package com.qinshift.linguine.linguinegenerator
22

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

28-
project.pluginManager.apply("io.github.cleverlance.linguine")
28+
project.pluginManager.apply("com.qinshift.linguine")
2929
val extension = project.extensions.getByType(LinguineConfig::class.java)
3030
extension.inputFilePath = "src/commonMain/resources/string.json"
3131
extension.outputFilePath = "presentation"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.qinshift.linguine.linguineruntime.presentation
2+
3+
internal data class Language(val code: String)
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
22

3-
package io.github.cleverlance.linguine.linguineruntime.presentation
3+
package com.qinshift.linguine.linguineruntime.presentation
44

55
internal expect object LanguageRepository {
66
fun load(): Language
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.cleverlance.linguine.linguineruntime.presentation
1+
package com.qinshift.linguine.linguineruntime.presentation
22

33
import co.touchlab.kermit.Logger
44

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.cleverlance.linguine.linguineruntime.presentation
1+
package com.qinshift.linguine.linguineruntime.presentation
22

33
import co.touchlab.kermit.Logger
44
import kotlin.native.concurrent.ThreadLocal

0 commit comments

Comments
 (0)