From a14aebc1f1979d1eac15e3473f477caf1a42b356 Mon Sep 17 00:00:00 2001 From: Karan Sharma <55722391+ksharma-xyz@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:39:49 +1000 Subject: [PATCH] repo name updatd --- .github/workflows/gen-kotlin.yaml | 16 ++++++++++++---- lib/build.gradle.kts | 11 ++++++++++- lib/src/main/kotlin/org/example/Library.kt | 10 ---------- lib/src/test/kotlin/org/example/LibraryTest.kt | 14 -------------- 4 files changed, 22 insertions(+), 29 deletions(-) delete mode 100644 lib/src/main/kotlin/org/example/Library.kt delete mode 100644 lib/src/test/kotlin/org/example/LibraryTest.kt diff --git a/.github/workflows/gen-kotlin.yaml b/.github/workflows/gen-kotlin.yaml index cf288e0..f7bb619 100644 --- a/.github/workflows/gen-kotlin.yaml +++ b/.github/workflows/gen-kotlin.yaml @@ -21,27 +21,35 @@ jobs: steps: - uses: actions/checkout@v4 + - name: List directory structure before building + run: ls -R + - name: Generate Protos run: ./gradlew generateProtos + - name: List directory structure after building + run: ls -R + + - name: List generated Kotlin files for debugging + run: ls -R lib/build/generated/source/wire/ + - name: Upload generated Kotlin files uses: actions/upload-artifact@v4 with: name: generated-kotlin-files path: build/generated/source/wire/*.kt - - name: Push to separate repo (replace with your details) + - name: Push to 'ksharma-xyz/Kotlin-Proto' repo uses: actions/checkout@v4 with: - repository: 'ksharma/Kotlin-Proto' # Target repo + repository: 'ksharma-xyz/Kotlin-Proto' # Target repo token: ${{ secrets.TOKEN }} # Use secret for authentication - name: Configure Git run: | git config user.name 'Karan Sharma' git config user.email '55722391+ksharma-xyz@users.noreply.github.com' - git config --global init.defaultBranch
- + git config --global init.defaultBranch main - name: Create a new branch run: | git checkout -b kotlin diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index 73bf8ec..4b527f6 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -15,7 +15,16 @@ plugins { } wire { - kotlin {} + kotlin { + javaInterop = true + out = "$projectDir/build/generated/source/wire" + } + protoPath { + srcDir("src/main/proto") + } + sourcePath { + srcDir("src/main/proto") + } } repositories { diff --git a/lib/src/main/kotlin/org/example/Library.kt b/lib/src/main/kotlin/org/example/Library.kt deleted file mode 100644 index 9fd8a7f..0000000 --- a/lib/src/main/kotlin/org/example/Library.kt +++ /dev/null @@ -1,10 +0,0 @@ -/* - * This source file was generated by the Gradle 'init' task - */ -package org.example - -class Library { - fun someLibraryMethod(): Boolean { - return true - } -} diff --git a/lib/src/test/kotlin/org/example/LibraryTest.kt b/lib/src/test/kotlin/org/example/LibraryTest.kt deleted file mode 100644 index 1516cde..0000000 --- a/lib/src/test/kotlin/org/example/LibraryTest.kt +++ /dev/null @@ -1,14 +0,0 @@ -/* - * This source file was generated by the Gradle 'init' task - */ -package org.example - -import kotlin.test.Test -import kotlin.test.assertTrue - -class LibraryTest { - @Test fun someLibraryMethodReturnsTrue() { - val classUnderTest = Library() - assertTrue(classUnderTest.someLibraryMethod(), "someLibraryMethod should return 'true'") - } -}