Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add Kuksa SDK via GitHub Packages #2

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
36 changes: 18 additions & 18 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*
Chrylo marked this conversation as resolved.
Show resolved Hide resolved
*/
import java.util.Properties

pluginManagement {
repositories {
Expand All @@ -29,6 +12,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 +23,23 @@ 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 {
return Properties().apply {
val localProperties = file("$rootDir/local.properties")
load(localProperties.reader())
}
}
Loading