Skip to content

Commit

Permalink
Cleanup & add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
deusaquilus committed Oct 15, 2024
1 parent 70f37d1 commit 94d5e96
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 40 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on: [pull_request, push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: 'Build + Test Android on Linux'
if: matrix.os == 'ubuntu-latest'
run: ./gradlew build --stacktrace -PisCI -Pnosign

- name: 'Build + Common OSX Sources'
if: matrix.os == 'macOS-latest'
run: ./gradlew :shared:build --stacktrace -PisCI -Pnosign
7 changes: 1 addition & 6 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ kotlin {
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
//implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(projects.shared)
implementation(libs.androidx.compose.material3)
implementation(libs.terpal.core.get().simpleString()) {
// This interferes with org.jetbrains:annotations in the in the android modules
exclude("com.sschr15.annotations","jb-annotations-kmp")
}
//implementation(libs.koin.compose.viewmodel)
implementation(libs.androidx.lifecycle.viewmodel.compose)
}
}
Expand All @@ -69,10 +68,6 @@ fun MinimalExternalModuleDependency.simpleString() =

android {

//configurations.forEach {
// it.exclude(group = "com.sschr15.annotations", module = "jb-annotations-kmp")
//}

namespace = "com.example.project"
compileSdk = libs.versions.android.compileSdk.get().toInt()

Expand Down
5 changes: 0 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ androidx-material = { group = "com.google.android.material", name = "material",
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }

# KMP Kolin and Kotlinx
#koin-compose-viewmodel = { group = "io.insert-koin", name = "koin-compose-viewmodel", version = "4.0.0" }
#androidx-lifecycle-viewmodel-compose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
#androidx-navigation-compose = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "androidx-navigation" }

#Androidx specific libraries
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleViewmodelCompose" }
androidx-lifecycle-viewmodel = { group = "org.jetbrains.androidx.lifecycle", name = "lifecycle-viewmodel", version.ref = "androidx-lifecycle" }
Expand Down
16 changes: 1 addition & 15 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

pluginManagement {
repositories {
google {
//mavenContent {
// includeGroupAndSubgroups("androidx")
// includeGroupAndSubgroups("com.android")
// includeGroupAndSubgroups("com.google")
//}
}
google()
mavenCentral()
gradlePluginPortal()
//mavenLocal()
}
}

Expand All @@ -27,13 +20,6 @@ dependencyResolutionManagement {
}
mavenCentral()
mavenLocal()
// {
// mavenContent {
// includeModule("io.exoquery", "terpal-sql-core")
// includeModule("io.exoquery", "terpal-sql-core-jvm")
// includeModule("io.exoquery", "terpal-sql-android")
// }
// }
}
}

Expand Down
15 changes: 1 addition & 14 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ kotlin {
implementation(libs.kotlinx.datetime)
implementation(libs.koin.core)
implementation(libs.terpal.core.get().simpleString()) {
// This interferes with org.jetbrains:annotations in the in the android modules
exclude("com.sschr15.annotations","jb-annotations-kmp")
}
//compileOnly(libs.jetbrains.annotations.kmp)
}
androidMain {
dependencies {
implementation(libs.ktor.client.android)
implementation(libs.android.driver)
// not sure why putting this here blows things up
//implementation(libs.terpal.android)
implementation(libs.jetbrains.annotations)
}
}
Expand All @@ -64,11 +63,6 @@ fun MinimalExternalModuleDependency.simpleString() =
this.let { "${it.module}:${it.versionConstraint.requiredVersion}" }

android {
// Otherwise will complain there are duplicate annotations between jb-annotations and jb-annotations-kmp
//configurations.forEach {
// it.exclude(group = "com.sschr15.annotations", module = "jb-annotations-kmp")
//}

namespace = "com.example.project.shared"
compileSdk = libs.versions.android.compileSdk.get().toInt()
compileOptions {
Expand All @@ -89,13 +83,6 @@ sqldelight {
}

repositories {
// mavenLocal {
// mavenContent {
// includeModule("io.exoquery", "terpal-sql-core")
// includeModule("io.exoquery", "terpal-sql-core-jvm")
// includeModule("io.exoquery", "terpal-sql-android")
// }
// }
google()
mavenCentral()
mavenLocal()
Expand Down

0 comments on commit 94d5e96

Please sign in to comment.