-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The plugin is a composite project which means a higher separation to the other modules and common buildSrc plugins can't be used here. So plugins like publish / version had to be copied. The publish script had to be adapted for publishing a plugin close #45 Signed-Off-By: Mark Hüsers <mark.huesers@etas.com>
- Loading branch information
Showing
13 changed files
with
200 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?xml version="1.0" ?> | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<SmellBaseline> | ||
<ManuallySuppressedIssues></ManuallySuppressedIssues> | ||
<CurrentIssues> | ||
</CurrentIssues> | ||
<ManuallySuppressedIssues> | ||
<ID>EmptyFunctionBlock:VssProcessorPlugin.kt$VssProcessorPlugin${ }</ID> | ||
</ManuallySuppressedIssues> | ||
<CurrentIssues/> | ||
</SmellBaseline> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ | |
|
||
plugins { | ||
kotlin("jvm") | ||
`maven-publish` | ||
publish | ||
alias(libs.plugins.dokka) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* 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 | ||
* | ||
*/ | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
`java-gradle-plugin` | ||
`maven-publish` | ||
// publish | ||
} | ||
|
||
gradlePlugin { | ||
plugins { | ||
create("VssProcessorPlugin") { | ||
id = "org.eclipse.kuksa.vss-processor-plugin" | ||
implementationClass = "org.eclipse.kuksa.vssprocessor.plugin.VssProcessorPlugin" | ||
} | ||
} | ||
} | ||
|
||
group = "org.eclipse.kuksa" | ||
version = "0.1.2" | ||
|
||
dependencies { | ||
implementation(kotlin("stdlib")) | ||
} | ||
|
||
//configure<Publish_gradle.PublishPluginExtension> { | ||
// mavenPublicationName = "release" | ||
// componentName = "java" | ||
// description = "Vehicle Signal Specification (VSS) Plugin of the KUKSA SDK" | ||
//} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
53 changes: 53 additions & 0 deletions
53
...rocessor-plugin/src/main/java/org/eclipse/kuksa/vssprocessor/plugin/VssProcessorPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* 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 | ||
*/ | ||
|
||
package org.eclipse.kuksa.vssprocessor.plugin | ||
|
||
import org.gradle.api.DefaultTask | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.api.file.RegularFileProperty | ||
import org.gradle.api.tasks.InputFile | ||
import org.gradle.api.tasks.TaskAction | ||
import java.io.File | ||
|
||
class VssProcessorPlugin : Plugin<Project> { | ||
override fun apply(project: Project) { | ||
} | ||
} | ||
|
||
abstract class ProvideVssDefinitionTask : DefaultTask() { | ||
|
||
@get:InputFile | ||
abstract val vssDefinitionFile: RegularFileProperty | ||
|
||
@TaskAction | ||
fun provideFile() { | ||
val vssDefinitionInputFile = vssDefinitionFile.get().asFile | ||
val buildDirPath = project.buildDir.absolutePath | ||
val vssDefinitionBuildFile = File("$buildDirPath/$KSP_INPUT_BUILD_DIRECTORY/${vssDefinitionInputFile.name}") | ||
|
||
println("Found VSS definition input file: ${vssDefinitionInputFile.name}, copying to: $vssDefinitionBuildFile") | ||
|
||
vssDefinitionInputFile.copyTo(vssDefinitionBuildFile, true) | ||
} | ||
|
||
companion object { | ||
private const val KSP_INPUT_BUILD_DIRECTORY = "kspInput/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters