Skip to content

Commit

Permalink
Merge pull request #2 from boschglobal/feature-1
Browse files Browse the repository at this point in the history
feature: Add Kuksa SDK via GitHub Packages
  • Loading branch information
SebastianSchildt authored Nov 15, 2023
2 parents 32462a9 + 6cd1bdd commit 7edb141
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 7 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build

on:
pull_request

jobs:
build-project:
env:
GPR_USERNAME: ${{ github.actor }}
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run 'assemble' with Gradle Wrapper
run: ./gradlew assemble

- name: Run 'check' with Gradle Wrapper
run: ./gradlew ktlintCheck detekt

- name: Run 'test' with Gradle Wrapper
run: ./gradlew test
14 changes: 14 additions & 0 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: commitlint

on:
pull_request

jobs:
commitlint:
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3

- uses: wagoid/commitlint-github-action@v5
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {
defaultConfig {
applicationId = "org.eclipse.kuksa.demo"
minSdk = 27
targetSdk = 33
targetSdk = 34
versionCode = 1
versionName = "1.0"

Expand Down Expand Up @@ -88,7 +88,7 @@ dependencies {
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation("org.eclipse.kuksa:kuksa-sdk:0.1.0-SNAPSHOT") {
implementation(libs.kuksa.sdk) {
isChanging = true
}
implementation(libs.androidx.datastore)
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/detekt.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask

val baselineFile = project.file("$rootDir/config/detekt/baseline/${project.name}.xml")
val baselineFile = project.file("$rootDir/config/detekt/baseline.xml")

plugins {
id("io.gitlab.arturbosch.detekt") // see https://github.com/detekt/detekt
Expand Down
File renamed without changes.
9 changes: 5 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
activityKtx = "1.8.0"
androidGradlePlugin = "8.1.2" # Check with detekt table first: https://detekt.dev/docs/introduction/compatibility/
androidGradlePlugin = "8.1.3" # Check with detekt table first: https://detekt.dev/docs/introduction/compatibility/
coreKtx = "1.12.0"
datastore = "1.0.0"
espressoCore = "3.5.1"
Expand All @@ -14,12 +14,12 @@ androidxLifecycle = "2.6.2"
kotlinCompilerExtension = "1.5.1"
composeBom = "2023.10.01"
jvmTarget = "17"
kuksaSdk = "0.1.2-SNAPSHOT"
lifecycleRuntimeCompose = "2.6.2"
ramsesAar = "1.1.0"
navigationCompose = "2.7.4"
navigationCompose = "2.7.5"
kotlinxSerializationJson = "1.6.0"
constraintlayoutCompose = "1.0.1"
vssProcessor = "0.1.0-SNAPSHOT"

[libraries]
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
Expand All @@ -34,7 +34,8 @@ androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidxLifecycle" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
vss-processor = { module = "org.eclipse.kuksa.vss-processor:vss-processor", version.ref = "vssProcessor" }
kuksa-sdk = { module = "org.eclipse.kuksa:kuksa-sdk", version.ref = "kuksaSdk" }
vss-processor = { module = "org.eclipse.kuksa:vss-processor", version.ref = "kuksaSdk" }
ramses-aar = { module = "io.github.bmwcarit:ramses-aar", version.ref = "ramsesAar" }

# Compose
Expand Down
23 changes: 23 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*
*/

import java.util.Properties

pluginManagement {
repositories {
mavenLocal()
Expand All @@ -29,6 +31,7 @@ pluginManagement {
id("com.google.devtools.ksp") version "1.9.0-1.0.11"
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
Expand All @@ -39,7 +42,27 @@ dependencyResolutionManagement {
google()
mavenCentral()
mavenLocal()
maven {
url = uri("https://maven.pkg.github.com/eclipse-kuksa/kuksa-android-sdk")
credentials {
val localProperties = loadLocalProperties()

username = System.getenv("GPR_USERNAME") ?: localProperties?.getProperty("gpr.user")
password = System.getenv("GPR_TOKEN") ?: localProperties?.getProperty("gpr.key")
}
}
}
}

include(":app")

fun loadLocalProperties(): Properties? {
val localProperties = file("$rootDir/local.properties")
if (!localProperties.exists()) return null

localProperties.reader().use { reader ->
return Properties().apply {
load(reader)
}
}
}

0 comments on commit 7edb141

Please sign in to comment.