Skip to content

Commit

Permalink
feat: create a new library project
Browse files Browse the repository at this point in the history
  • Loading branch information
kkostov committed Oct 27, 2024
1 parent 40a5ac2 commit 6a38802
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To get started with publishing to Maven Central, sign in (or create a new accoun
**For a GitHub repository**
Using your GitHub account to create a namespace is a good option if you don’t own a domain name to use for publication. To create a namespace based on your GitHub account:

1. Enter `io.github.<your username>` as your namespace. For example, `io.github.kotlin-hands-on`.
1. Enter `io.github.<your username>` as your namespace. For example, `eu.iamkonstantin.kotlin-hands-on`.
2. Copy the Verification Key displayed.
3. On GitHub, create a new repository with your GitHub account with the verification key as the repository’s name. For example, `http://github.com/kotlin-hands-on/ex4mpl3c0d`.
4. Navigate back to Maven Central, and click on the Verify Namespace button. After verification succeeds you can delete the repository you’ve created.
Expand Down Expand Up @@ -194,7 +194,7 @@ If you have an Android target in your project, you should follow the [steps to p
// build.gradle.kts

android {
namespace = "io.github.kotlinhandson.fibonacci"
namespace = "eu.iamkonstantin.kotlinhandson.fibonacci"
}
```

Expand Down
26 changes: 11 additions & 15 deletions library/build.gradle.kts → gadulka/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
alias(libs.plugins.vanniktech.mavenPublish)
}

group = "io.github.kotlin"
group = "eu.iamkonstantin.kotlin"
version = "1.0.0"

kotlin {
Expand Down Expand Up @@ -40,7 +40,7 @@ kotlin {
}

android {
namespace = "org.jetbrains.kotlinx.multiplatform.library.template"
namespace = "eu.iamkonstantin.kotlin.gadulka"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.android.minSdk.get().toInt()
Expand All @@ -52,31 +52,27 @@ mavenPublishing {

signAllPublications()

coordinates(group.toString(), "library", version.toString())
coordinates(group.toString(), "gadulka", version.toString())

pom {
name = "My library"
description = "A library."
name = "Gadulka"
description = "Gadulka is cross-platform player library enabling playback of files for Kotlin apps"
inceptionYear = "2024"
url = "https://github.com/kotlin/multiplatform-library-template/"
url = "https://github.com/kkostov/gadulka/"
licenses {
license {
name = "XXX"
url = "YYY"
distribution = "ZZZ"
name = "GPLv3"
url = "https://www.gnu.org/licenses/gpl-3.0.html#license-text"
}
}
developers {
developer {
id = "XXX"
name = "YYY"
url = "ZZZ"
id.set("iamkonstantin")
name.set("Konstantin")
}
}
scm {
url = "XXX"
connection = "YYY"
developerConnection = "ZZZ"
url = "https://github.com/kkostov/gadulka/"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

actual val firstElement: Int = 1
actual val secondElement: Int = 2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

fun generateFibi() = sequence {
var a = firstElement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

actual val firstElement: Int = 3
actual val secondElement: Int = 4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

actual val firstElement: Int = 2
actual val secondElement: Int = 3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

actual val firstElement: Int = 3
actual val secondElement: Int = 5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.kotlin.fibonacci
package eu.iamkonstantin.kotlin.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ dependencyResolutionManagement {
}

rootProject.name = "multiplatform-library-template"
include(":library")
include(":gadulka")

0 comments on commit 6a38802

Please sign in to comment.