-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
136ecd0
commit 170f28f
Showing
15 changed files
with
452 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: snapshot | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- version-** | ||
|
||
jobs: | ||
release: | ||
name: Test and Upload SnapShot | ||
runs-on: macos-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.konan | ||
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }} | ||
|
||
- name: Clean | ||
run: ./gradlew clean | ||
|
||
- name: Test | ||
run: ./gradlew allTests | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: test_results | ||
path: | | ||
build/reports/tests/** | ||
*/build/reports/tests/** | ||
retention-days: 10 | ||
|
||
- name: Build | ||
env: | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
ORG_GRADLE_PROJECT_lightningKiteMavenAwsAccessKey: AKIARR4DEGXXROVKYNNP | ||
ORG_GRADLE_PROJECT_lightningKiteMavenAwsSecretAccessKey: ${{ secrets.MAVENS3SECRETKEY }} | ||
run: ./gradlew publishAllPublicationsToLightningKiteRepository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: TestPullRequest | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- version-* | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test_project: | ||
runs-on: macos-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.konan | ||
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }} | ||
|
||
- name: Run Tests | ||
run: ./gradlew allTests | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: commitTestResults | ||
path: | | ||
build/reports/tests/** | ||
*/build/reports/tests/** | ||
retention-days: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.idea | ||
.gradle | ||
.kotlin | ||
build | ||
build | ||
local.version.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,37 @@ | ||
import com.lightningkite.deployhelpers.lk | ||
|
||
plugins { | ||
kotlin("multiplatform") version "2.1.0" | ||
id("com.vanniktech.maven.publish") version "0.30.0" | ||
} | ||
group = "com.lightningkite.kiteui" | ||
version = "1.0-SNAPSHOT" | ||
|
||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
maven("https://lightningkite-maven.s3.us-west-2.amazonaws.com") | ||
google() | ||
mavenCentral() | ||
maven("https://jitpack.io") | ||
} | ||
dependencies { | ||
classpath("com.lightningkite:lk-gradle-helpers:1.1.1") | ||
classpath("com.lightningkite:lk-gradle-helpers:1.0.8") | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0") | ||
classpath("org.jetbrains.kotlin:kotlin-serialization:2.1.0") | ||
classpath("org.jetbrains.dokka:dokka-gradle-plugin:2.0.0") | ||
classpath("com.android.tools.build:gradle:8.5.2") | ||
} | ||
} | ||
|
||
group = "com.lightningkite" | ||
version = "1.0-SNAPSHOT" | ||
|
||
val lk = lk {} | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
explicitApi() | ||
applyDefaultHierarchyTemplate() | ||
jvm { | ||
compilerOptions.jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8) | ||
} | ||
js(IR) { | ||
browser() | ||
} | ||
iosX64() | ||
iosArm64() | ||
iosSimulatorArm64() | ||
macosX64() | ||
macosArm64() | ||
|
||
sourceSets { | ||
all { | ||
languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi") | ||
} | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
kotlin { | ||
srcDir(file("build/generated/ksp/common/commonMain/kotlin")) | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
} | ||
kotlin { | ||
srcDir(file("build/generated/ksp/common/commonTest/kotlin")) | ||
} | ||
} | ||
allprojects { | ||
group = "com.lightningkite.kiteui" | ||
repositories { | ||
mavenLocal() | ||
maven("https://lightningkite-maven.s3.us-west-2.amazonaws.com") | ||
maven("https://jitpack.io") | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
repositories { | ||
mavenLocal() | ||
maven("https://lightningkite-maven.s3.us-west-2.amazonaws.com") | ||
maven("https://jitpack.io") | ||
google() | ||
mavenCentral() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:2.1.0") | ||
} | ||
kotlin { | ||
jvmToolchain(17) | ||
} | ||
file("../plugin/src/main/kotlin/KotlinTestManualPlugin.kt") | ||
.copyTo(file("src/main/kotlin/KotlinTestManualPlugin.kt"), overwrite = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
rootProject.name = "buildSrc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
KotlinTestManualPlugin.kt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[versions] | ||
kotlinXDatetime = "0.6.1" | ||
|
||
[libraries] | ||
kotlinXDatetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = { ref = "kotlinXDatetime" } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import com.lightningkite.deployhelpers.* | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
|
||
plugins { | ||
`java-gradle-plugin` | ||
`kotlin-dsl` | ||
signing | ||
id("com.vanniktech.maven.publish") version "0.30.0" | ||
id("org.jetbrains.dokka") | ||
} | ||
|
||
gradlePlugin { | ||
plugins { | ||
create("lightningkite-testing-manual") { | ||
id = "com.lightningkite.testing.manual" | ||
implementationClass = "com.lightningkite.testing.manual.KotlinTestManualPlugin" | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:2.1.0") | ||
testImplementation("junit:junit:4.13.2") | ||
} | ||
tasks.validatePlugins { | ||
enableStricterValidation.set(true) | ||
} | ||
|
||
val lk = project.lk { | ||
version = gitBasedVersion().also { println("Determined version to be $it") } | ||
} | ||
mavenPublishing { | ||
signAllPublications() | ||
coordinates(group.toString(), name, version.toString()) | ||
pom { | ||
name.set("Testing-Gradle-Plugin") | ||
description.set("Automatically create your routers") | ||
github("lightningkite", "kotlin-test-manual") | ||
|
||
licenses { | ||
mit() | ||
} | ||
|
||
developers { | ||
joseph() | ||
brady() | ||
} | ||
} | ||
} | ||
|
||
tasks.create("publishLocally", Copy::class.java) { | ||
group = "publishing" | ||
from(file("src/main/kotlin/KotlinTestManualPlugin.kt")) | ||
into(rootProject.file("buildSrc/src/main/kotlin")) | ||
} |
Oops, something went wrong.