Ashu Tyagi
06/05/2023, 1:48 PM> Task :shared:publishKMMBridgeFrameworkPublicationToGitHubPackagesRepository FAILED
FAILURE: Build failed with an exception.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
* What went wrong:
Execution failed for task ':shared:publishKMMBridgeFrameworkPublicationToGitHubPackagesRepository'.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
> Failed to publish publication 'KMMBridgeFramework' to repository 'GitHubPackages'
> Invalid publication 'KMMBridgeFramework': artifact file does not exist: '/Users/runner/work/kite-android/kite-android/shared/build/faktory/zip/frameworkarchive.zip'
russhwolf
06/05/2023, 3:45 PMNO_SOURCE
suggest that it can't find your source files. Did you make any changes to your file structure recently?Ashu Tyagi
06/05/2023, 4:38 PMAshu Tyagi
06/05/2023, 4:43 PMrusshwolf
06/05/2023, 6:15 PMAshu Tyagi
06/05/2023, 6:19 PMAshu Tyagi
06/05/2023, 6:39 PMrusshwolf
06/05/2023, 6:40 PMAshu Tyagi
06/05/2023, 6:43 PMplugins {
kotlin("multiplatform")
id("com.android.library")
id("co.touchlab.faktory.kmmbridge") version Dependencies.Common.kmm_bridge
`maven-publish`
kotlin("native.cocoapods")
}
version = "0.1"
kotlin {
android {
publishAllLibraryVariants()
}
ios()
iosSimulatorArm64()
sourceSets {
val commonMain by getting {
dependencies {
api(project(":shared:core-analytics"))
api(project(":shared:core-base"))
api(project(":shared:core-network"))
api(project(":shared:core-preferences"))
api(project(":shared:core-remote-config"))
api(project(":shared:feature-homepage"))
api(project(":shared:feature-onboarding"))
api(project(":shared:feature-one-time-payments"))
api(project(":shared:feature-one-time-payments-common"))
api(project(":shared:feature-profile"))
api(project(":shared:feature-settings"))
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting
val androidUnitTest by getting
val iosMain by getting
val iosTest by getting
val iosSimulatorArm64Main by getting {
dependsOn(iosMain)
}
val iosSimulatorArm64Test by getting {
dependsOn(iosTest)
}
}
cocoapods {
summary = "Kite Shared Binary"
homepage = "<https://www.google.com/>"
ios.deploymentTarget = "13.1"
framework {
export(project(":shared:core-analytics"))
export(project(":shared:core-base"))
export(project(":shared:core-network"))
export(project(":shared:core-preferences"))
export(project(":shared:core-remote-config"))
export(project(":shared:feature-homepage"))
export(project(":shared:feature-onboarding"))
export(project(":shared:feature-one-time-payments"))
export(project(":shared:feature-one-time-payments-common"))
export(project(":shared:feature-profile"))
export(project(":shared:feature-settings"))
export("dev.icerock.moko:resources:${Dependencies.Common.moko_resource}")
isStatic = true
}
}
}
android {
namespace = "com.kite.app.shared"
compileSdk = rootProject.extra.get("compileSdk") as Int
defaultConfig {
minSdk = rootProject.extra.get("minSdk") as Int
targetSdk = rootProject.extra.get("targetSdk") as Int
}
}
addGithubPackagesRepository()
kmmbridge {
mavenPublishArtifacts()
githubReleaseVersions()
spm()
cocoapods("git@github.com:kiteapp/IosPodspec.git")
versionPrefix.set("0.1")
}
Ashu Tyagi
06/05/2023, 6:44 PMAshu Tyagi
06/05/2023, 6:59 PMrusshwolf
06/05/2023, 7:36 PMAshu Tyagi
06/05/2023, 7:40 PMrusshwolf
06/05/2023, 7:42 PM./gradlew linkPodReleaseFrameworkIosX64
works, does it still print NO-SOURCE
? Are you sure it's actually building anything? Are there source files in your top-level module?Ashu Tyagi
06/05/2023, 7:46 PMNO_SOURCE
.russhwolf
06/05/2023, 7:46 PMlinkPodReleaseFrameworkIosX64
and then do kmmBridgePublish
immediately after?Ashu Tyagi
06/05/2023, 7:48 PMAshu Tyagi
06/05/2023, 7:48 PMAre you sure it's actually building anything? Are there source files in your top-level module?
Which folder shall I be searching for?russhwolf
06/05/2023, 7:51 PMENABLE_PUBLISHING
. You can do this by passing -PENABLE_PUBLISHING=true
to gradle (if you use our github workflow, this should already be happening, but you'll need to pass it manually if you're doing things locally)Ashu Tyagi
06/05/2023, 7:55 PMif you use our github workflow, this should already be happening, but you'll need to pass it manually if you're doing things locally
I'm using the github workflow only. I was trying out to build it locally just to check if there are any errors.
Let me try to do above mentioned steps.Ashu Tyagi
06/05/2023, 8:20 PM/gradlew linkPodReleaseFrameworkIosX64.
Below is the error:
> Task :shared:core-base:compileKotlinIosX64 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:core-base:compileKotlinIosX64'.
> You must specify a base url or at least one artifact pattern for the Ivy repository 'Kotlin Native(<https://download.jetbrains.com/kotlin/native/builds)>'.
russhwolf
06/06/2023, 2:34 PMGITHUB_PUBLISH_TOKEN
and GITHUB_REPO
. For the first, you'll need to generate a personal access token with repo and package permissions. For the second, it's of the form YourOrg/YourRepo
.russhwolf
06/06/2023, 2:34 PMrusshwolf
06/06/2023, 2:35 PMAshu Tyagi
06/06/2023, 5:15 PMrepositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
Ashu Tyagi
06/06/2023, 5:22 PMNO_SOURCE
error for:
Task :shared:compileKotlinIosX64 NO-SOURCE
Today I added a dummy class in the commonMain folder of the shared module & the build is working just fine.Ashu Tyagi
06/06/2023, 5:22 PMrusshwolf
06/06/2023, 6:42 PM