Skip to content

Commit

Permalink
First commit for Kotlin-hands-on
Browse files Browse the repository at this point in the history
  • Loading branch information
pahill committed Sep 26, 2024
1 parent 0983154 commit 35b7cd2
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 20 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish
on:
release:
types: [released, prereleased]
jobs:
publish:
name: Release build and publish
runs-on: macOS-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Publish to MavenCentral
run: ./gradlew publishToMavenCentral
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}

20 changes: 10 additions & 10 deletions fibonacci/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "io.github.pahill"
group = "io.github.kotlin-hands-on"
version = "1.0.6"

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

android {
namespace = "io.github.pahill.fibonacci"
namespace = "io.github.kotlinhandson.fibonacci"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.android.minSdk.get().toInt()
Expand All @@ -52,13 +52,13 @@ mavenPublishing {

signAllPublications()

coordinates("io.github.pahill", "fibonacci", "1.0.6")
coordinates("io.github.kotlin-hands-on", "fibonacci", "1.0.6")

pom {
name.set("Fibonacci library")
description.set("A description of what my library does.")
inceptionYear.set("2024")
url.set("https://github.com/pahill/fibonacci/")
url.set("https://github.com/kotlin-hands-on/fibonacci/")
licenses {
license {
name.set("The Apache License, Version 2.0")
Expand All @@ -68,15 +68,15 @@ mavenPublishing {
}
developers {
developer {
id.set("pahill")
name.set("Pamela Hill")
url.set("https://github.com/pahill/")
id.set("kotlin-hands-on")
name.set("Kotlin Developer Advocate")
url.set("https://github.com/kotlin-hands-on/")
}
}
scm {
url.set("https://github.com/pahill/fibonacci/")
connection.set("scm:git:git://github.com/pahill/fibonacci.git")
developerConnection.set("scm:git:ssh://[email protected]/pahill/fibonacci.git")
url.set("https://github.com/kotlin-hands-on/fibonacci/")
connection.set("scm:git:git://github.com/kotlin-hands-on/fibonacci.git")
developerConnection.set("scm:git:ssh://[email protected]/kotlin-hands-on/fibonacci.git")
}
}
}
2 changes: 1 addition & 1 deletion fibonacci/src/androidMain/kotlin/fibiprops.android.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

actual val firstElement: Int = 1
actual val secondElement: Int = 2
2 changes: 1 addition & 1 deletion fibonacci/src/androidUnitTest/kotlin/AndroidFibiTest.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
2 changes: 1 addition & 1 deletion fibonacci/src/commonMain/kotlin/CustomFibi.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

fun generateFibi() = sequence {
var a = firstElement
Expand Down
2 changes: 1 addition & 1 deletion fibonacci/src/commonTest/kotlin/FibiTest.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
2 changes: 1 addition & 1 deletion fibonacci/src/iosMain/kotlin/fibiprops.ios.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

actual val firstElement: Int = 3
actual val secondElement: Int = 4
2 changes: 1 addition & 1 deletion fibonacci/src/iosTest/kotlin/IosFibiTest.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
2 changes: 1 addition & 1 deletion fibonacci/src/jvmMain/kotlin/fibiprops.jvm.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

actual val firstElement: Int = 2
actual val secondElement: Int = 3
2 changes: 1 addition & 1 deletion fibonacci/src/jvmTest/kotlin/JvmFibiTest.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down
2 changes: 1 addition & 1 deletion fibonacci/src/linuxX64Main/kotlin/fibiprops.linuxX64.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

actual val firstElement: Int = 3
actual val secondElement: Int = 5
2 changes: 1 addition & 1 deletion fibonacci/src/linuxX64Test/kotlin/LinuxFibiTest.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pahill.fibonacci
package io.github.kotlinhandson.fibonacci

import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down

0 comments on commit 35b7cd2

Please sign in to comment.