diff --git a/.github/workflows/deploy-release.yaml b/.github/workflows/deploy-release.yaml index d143ab1e..55ac14bc 100644 --- a/.github/workflows/deploy-release.yaml +++ b/.github/workflows/deploy-release.yaml @@ -7,11 +7,9 @@ on: tags: - 'release/v*' -permissions: - packages: write - jobs: deployment: + if: github.repository == 'eclipse-kuksa/kuksa-android-sdk' runs-on: ubuntu-latest steps: - name: Checkout code @@ -29,7 +27,10 @@ jobs: run: ./gradlew setReleaseVersion # Do not chain this command because it writes into a file which needs to be re-read inside the next gradle command - name: Publish Library - run: ./gradlew publishReleasePublicationToGithubPackagesRepository - -Pgpr.repository=${{ github.repository }} - -Pgpr.user=${{ github.actor }} - -Pgpr.token=${{ secrets.GITHUB_TOKEN }} + env: + ORG_GPG_KEY_ID: ${{ secrets.ORG_GPG_KEY_ID }} + ORG_GPG_PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }} + ORG_GPG_PRIVATE_KEY: ${{ secrets.ORG_GPG_PRIVATE_KEY }} + ORG_OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }} + ORG_OSSRH_USERNAME: ${{ secrets.ORG_OSSRH_USERNAME }} + run: ./gradlew publishAllPublicationsToOSSRHReleaseRepository diff --git a/.github/workflows/deploy-snapshot.yaml b/.github/workflows/deploy-snapshot.yaml index 08786e5d..3a22f627 100644 --- a/.github/workflows/deploy-snapshot.yaml +++ b/.github/workflows/deploy-snapshot.yaml @@ -7,11 +7,9 @@ on: branches: - main -permissions: - packages: write - jobs: deployment: + if: github.repository == 'eclipse-kuksa/kuksa-android-sdk' runs-on: ubuntu-latest steps: - name: Checkout code @@ -32,7 +30,10 @@ jobs: run: ./gradlew setSnapshotVersion # Do not chain this command because it writes into a file which needs to be re-read inside the next gradle command - name: Publish Library - run: ./gradlew publishReleasePublicationToGithubPackagesRepository - -Pgpr.repository=${{ github.repository }} - -Pgpr.user=${{ github.actor }} - -Pgpr.token=${{ secrets.GITHUB_TOKEN }} + env: + ORG_GPG_KEY_ID: ${{ secrets.ORG_GPG_KEY_ID }} + ORG_GPG_PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }} + ORG_GPG_PRIVATE_KEY: ${{ secrets.ORG_GPG_PRIVATE_KEY }} + ORG_OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }} + ORG_OSSRH_USERNAME: ${{ secrets.ORG_OSSRH_USERNAME }} + run: ./gradlew --stacktrace publishAllPublicationsToOSSRHSnapshotRepository diff --git a/README.md b/README.md index 548dbdfe..d3860696 100644 --- a/README.md +++ b/README.md @@ -26,21 +26,9 @@ Snapshot builds are also available (but of course less stable): [Package view](h See the [quickstart guide](https://github.com/eclipse-kuksa/kuksa-android-sdk/tree/main/docs/QUICKSTART.md) for additional integration options. -### GitHub packages +### Maven Central -The KUKSA SDK is currently uploaded to [GitHub packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry) -where an [authentication](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#authenticating-to-github-packages) -is needed to download the dependency. - -``` -maven { - url = uri("https://maven.pkg.github.com/eclipse-kuksa/kuksa-android-sdk") - credentials { - username = - password = - } -} -``` +The KUKSA SDK is currently uploaded to [Maven Central](https://central.sonatype.com/search?q=org.eclipse.kuksa). ## Usage diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ca15503c..902f0a52 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,3 +1,22 @@ +/* + * 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 + * + */ + plugins { id("com.android.application") id("com.google.devtools.ksp") diff --git a/app/src/main/kotlin/org/eclipse/kuksa/testapp/extension/compose/HeadlineView.kt b/app/src/main/kotlin/org/eclipse/kuksa/testapp/extension/compose/HeadlineView.kt index af220c63..792e07be 100644 --- a/app/src/main/kotlin/org/eclipse/kuksa/testapp/extension/compose/HeadlineView.kt +++ b/app/src/main/kotlin/org/eclipse/kuksa/testapp/extension/compose/HeadlineView.kt @@ -1,21 +1,19 @@ /* + * Copyright (c) 2023 Contributors to the Eclipse Foundation * - * * 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 - * * + * 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 * */ diff --git a/app/src/main/kotlin/org/eclipse/kuksa/testapp/extension/compose/OverflowMenuView.kt b/app/src/main/kotlin/org/eclipse/kuksa/testapp/extension/compose/OverflowMenuView.kt index 8411bd05..1bb1b858 100644 --- a/app/src/main/kotlin/org/eclipse/kuksa/testapp/extension/compose/OverflowMenuView.kt +++ b/app/src/main/kotlin/org/eclipse/kuksa/testapp/extension/compose/OverflowMenuView.kt @@ -1,21 +1,19 @@ /* + * Copyright (c) 2023 Contributors to the Eclipse Foundation * - * * 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 - * * + * 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 * */ diff --git a/app/src/main/res/drawable/baseline_upload_file_24.xml b/app/src/main/res/drawable/baseline_upload_file_24.xml index 3dd85597..9c0581c3 100644 --- a/app/src/main/res/drawable/baseline_upload_file_24.xml +++ b/app/src/main/res/drawable/baseline_upload_file_24.xml @@ -1,3 +1,22 @@ + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 036d09bc..d4a068c0 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,24 @@ + + - \ No newline at end of file + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 036d09bc..d4a068c0 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,24 @@ + + - \ No newline at end of file + diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml index 8389a011..1ad97c7a 100644 --- a/app/src/main/res/values/ic_launcher_background.xml +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -14,6 +14,8 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ + ~ SPDX-License-Identifier: Apache-2.0 + ~ --> diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index e57148ef..cf8e4b48 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,4 +1,22 @@ -import org.gradle.kotlin.dsl.`kotlin-dsl` +/* + * 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 + * + */ + import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts index 84f7aaea..efa28599 100644 --- a/buildSrc/settings.gradle.kts +++ b/buildSrc/settings.gradle.kts @@ -1,3 +1,22 @@ +/* + * 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 + * + */ + dependencyResolutionManagement { repositories { gradlePluginPortal() diff --git a/buildSrc/src/main/kotlin/detekt.gradle.kts b/buildSrc/src/main/kotlin/detekt.gradle.kts index dffee6c0..89f3769e 100644 --- a/buildSrc/src/main/kotlin/detekt.gradle.kts +++ b/buildSrc/src/main/kotlin/detekt.gradle.kts @@ -1,3 +1,22 @@ +/* + * 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 + * + */ + import io.gitlab.arturbosch.detekt.Detekt import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask import org.eclipse.kuksa.extension.lib diff --git a/buildSrc/src/main/kotlin/ktlint.gradle.kts b/buildSrc/src/main/kotlin/ktlint.gradle.kts index 9088073d..0c544b23 100644 --- a/buildSrc/src/main/kotlin/ktlint.gradle.kts +++ b/buildSrc/src/main/kotlin/ktlint.gradle.kts @@ -1,7 +1,21 @@ -import org.gradle.kotlin.dsl.creating -import org.gradle.kotlin.dsl.dependencies -import org.gradle.kotlin.dsl.named -import org.gradle.kotlin.dsl.registering +/* + * 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 + * + */ val ktlint by configurations.creating diff --git a/buildSrc/src/main/kotlin/publish.gradle.kts b/buildSrc/src/main/kotlin/publish.gradle.kts index b808ed55..acf4522d 100644 --- a/buildSrc/src/main/kotlin/publish.gradle.kts +++ b/buildSrc/src/main/kotlin/publish.gradle.kts @@ -19,11 +19,13 @@ plugins { `maven-publish` + signing } interface PublishPluginExtension { val mavenPublicationName: Property val componentName: Property + val description: Property } val extension = project.extensions.create("publish") @@ -32,21 +34,95 @@ afterEvaluate { publishing { repositories { maven { - name = "GithubPackages" + name = "OSSRHRelease" - val repository = project.findProperty("gpr.repository") as String? ?: System.getenv("GPR_REPOSITORY") - url = uri("https://maven.pkg.github.com/$repository") + url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { + username = System.getenv("ORG_OSSRH_USERNAME") + password = System.getenv("ORG_OSSRH_PASSWORD") + } + } + maven { + name = "OSSRHSnapshot" + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") credentials { - username = project.findProperty("gpr.user") as String? ?: System.getenv("GPR_USERNAME") - password = project.findProperty("gpr.token") as String? ?: System.getenv("GPR_TOKEN") + username = System.getenv("ORG_OSSRH_USERNAME") + password = System.getenv("ORG_OSSRH_PASSWORD") } } } publications { - register("${extension.mavenPublicationName.get()}") { - from(components["${extension.componentName.get()}"]) + register(extension.mavenPublicationName.get()) { + from(components[extension.componentName.get()]) + + pom { + name = "${project.group}:${project.name}" + description = extension.description.get() + url = "https://github.com/eclipse-kuksa/kuksa-android-sdk" + licenses { + license { + name.set("The Apache Software License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + name = "Mark Hüsers" + email = "mark.huesers@etas.com" + organization = "ETAS GmbH" + organizationUrl = "https://www.etas.com" + } + developer { + name = "Sebastian Schildt" + email = "sebastian.schildt@etas.com" + organization = "ETAS GmbH" + organizationUrl = "https://www.etas.com" + } + developer { + name = "Andre Weber" + email = "andre.weber3@etas.com" + organization = "ETAS GmbH" + organizationUrl = "https://www.etas.com" + } + } + scm { + connection.set("scm:git:github.com/eclipse-kuksa/kuksa-android-sdk.git") + developerConnection.set("scm:git:ssh://github.com/eclipse-kuksa/kuksa-android-sdk.git") + url.set("https://github.com/eclipse-kuksa/kuksa-android-sdk/tree/main") + } + } } } } + + signing { + var keyId: String? = System.getenv("ORG_GPG_KEY_ID") + if (keyId != null && keyId.length > 8) { + keyId = keyId.takeLast(8) + } + val privateKey = System.getenv("ORG_GPG_PRIVATE_KEY") + val passphrase = System.getenv("ORG_GPG_PASSPHRASE") + + useInMemoryPgpKeys( + keyId, + privateKey, + passphrase, + ) + + sign(publishing.publications) + } +} + +gradle.taskGraph.whenReady { + tasks.withType(Sign::class) { + val publishToMavenLocalTask = allTasks.find { it.name.contains("publishToMavenLocal") } + val isPublishingToMavenLocal = publishToMavenLocalTask != null + + if (isPublishingToMavenLocal) { + println(":${project.name}:$name - Signing is disabled (publishToMavenLocal)") + } + + onlyIf { !isPublishingToMavenLocal } // disable signing when publishing to MavenLocal + } } diff --git a/buildSrc/src/main/kotlin/version.gradle.kts b/buildSrc/src/main/kotlin/version.gradle.kts index 220fe66b..81c9398c 100644 --- a/buildSrc/src/main/kotlin/version.gradle.kts +++ b/buildSrc/src/main/kotlin/version.gradle.kts @@ -1,3 +1,22 @@ +/* + * 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 + * + */ + import org.eclipse.kuksa.version.SemanticVersion val file = File("$rootDir/version.txt") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f813c694..1c2e3b02 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -70,3 +70,4 @@ detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-form grpc-protoc-java-gen = { group = "io.grpc", name = "protoc-gen-grpc-java", version.ref = "grpc" } [plugins] +dokka = { id = "org.jetbrains.dokka", version.ref = "kotlin" } diff --git a/kuksa-sdk/build.gradle.kts b/kuksa-sdk/build.gradle.kts index fbe5157a..f10156c0 100644 --- a/kuksa-sdk/build.gradle.kts +++ b/kuksa-sdk/build.gradle.kts @@ -1,3 +1,22 @@ +/* + * 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 + * + */ + @file:Suppress("UnstableApiUsage") import com.google.protobuf.gradle.id @@ -45,6 +64,12 @@ android { } } } + publishing { + singleVariant("release") { + withJavadocJar() + withSourcesJar() + } + } } dependencies { @@ -70,6 +95,7 @@ dependencies { configure { mavenPublicationName = "release" componentName = "release" + description = "Android Connectivity Library for the KUKSA Databroker" } protobuf { diff --git a/kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/databroker/DataBrokerConnectorProvider.kt b/kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/databroker/DataBrokerConnectorProvider.kt index 87f9d1d6..24aae5f6 100644 --- a/kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/databroker/DataBrokerConnectorProvider.kt +++ b/kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/databroker/DataBrokerConnectorProvider.kt @@ -1,21 +1,19 @@ /* + * Copyright (c) 2023 Contributors to the Eclipse Foundation * - * * 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 - * * + * 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 * */ diff --git a/kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/vssSpecification/VssDriver.kt b/kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/vssSpecification/VssDriver.kt index 25585753..8d87ab8f 100644 --- a/kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/vssSpecification/VssDriver.kt +++ b/kuksa-sdk/src/test/kotlin/org/eclipse/kuksa/vssSpecification/VssDriver.kt @@ -1,21 +1,19 @@ /* + * Copyright (c) 2023 Contributors to the Eclipse Foundation * - * * 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 - * * + * 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 * */ diff --git a/samples/build.gradle.kts b/samples/build.gradle.kts index 84abfc8c..ece184fb 100644 --- a/samples/build.gradle.kts +++ b/samples/build.gradle.kts @@ -1,3 +1,22 @@ +/* + * 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 + * + */ + plugins { id("com.android.application") id("com.google.devtools.ksp") diff --git a/settings.gradle.kts b/settings.gradle.kts index 3a38676d..28ff0f32 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,22 @@ +/* + * 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 + * + */ + pluginManagement { repositories { gradlePluginPortal() diff --git a/vss-core/build.gradle.kts b/vss-core/build.gradle.kts index 9e6a4ade..20cc6bec 100644 --- a/vss-core/build.gradle.kts +++ b/vss-core/build.gradle.kts @@ -1,9 +1,29 @@ +/* + * 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 + * + */ + @file:Suppress("UnstableApiUsage") plugins { kotlin("jvm") `maven-publish` publish + alias(libs.plugins.dokka) } group = "org.eclipse.kuksa" @@ -32,4 +52,16 @@ tasks.withType().configureEach { configure { mavenPublicationName = "release" componentName = "java" + description = "Vehicle Signal Specification (VSS) Core Module of the KUKSA SDK" +} + +tasks.register("javadocJar", Jar::class) { + dependsOn("dokkaHtml") + from("$buildDir/dokka/html") + archiveClassifier.set("javadoc") +} + +java { + withJavadocJar() // needs to be called after tasks.register("javadocJar") + withSourcesJar() } diff --git a/vss-core/src/main/java/org/eclipse/kuksa/vsscore/model/VssSpecification.kt b/vss-core/src/main/java/org/eclipse/kuksa/vsscore/model/VssSpecification.kt index da6acd84..193e3946 100644 --- a/vss-core/src/main/java/org/eclipse/kuksa/vsscore/model/VssSpecification.kt +++ b/vss-core/src/main/java/org/eclipse/kuksa/vsscore/model/VssSpecification.kt @@ -1,21 +1,19 @@ /* + * Copyright (c) 2023 Contributors to the Eclipse Foundation * - * * 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 - * * + * 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 * */ diff --git a/vss-core/src/test/java/org/eclipse/kuksa/vsscore/model/VssVehicle.kt b/vss-core/src/test/java/org/eclipse/kuksa/vsscore/model/VssVehicle.kt index a28835b2..68e0bac9 100644 --- a/vss-core/src/test/java/org/eclipse/kuksa/vsscore/model/VssVehicle.kt +++ b/vss-core/src/test/java/org/eclipse/kuksa/vsscore/model/VssVehicle.kt @@ -1,21 +1,19 @@ /* + * Copyright (c) 2023 Contributors to the Eclipse Foundation * - * * 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 - * * + * 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 * */ diff --git a/vss-processor/build.gradle.kts b/vss-processor/build.gradle.kts index c7f46ca6..2b242f33 100644 --- a/vss-processor/build.gradle.kts +++ b/vss-processor/build.gradle.kts @@ -1,6 +1,26 @@ +/* + * 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 + * + */ + plugins { kotlin("jvm") publish + alias(libs.plugins.dokka) } group = "org.eclipse.kuksa" @@ -35,4 +55,16 @@ tasks.withType().configureEach { configure { mavenPublicationName = "release" componentName = "java" + description = "Vehicle Signal Specification (VSS) Code Generator for the KUKSA SDK" +} + +tasks.register("javadocJar", Jar::class) { + dependsOn("dokkaHtml") + from("$buildDir/dokka/html") + archiveClassifier.set("javadoc") +} + +java { + withJavadocJar() // needs to be called after tasks.register("javadocJar") + withSourcesJar() }