-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
158 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gradle" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,27 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Java CI with Gradle | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021 | ||
with: | ||
arguments: build test |
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,36 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Publish to mavencentral | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
- name: Build and publish with Gradle | ||
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021 | ||
with: | ||
arguments: jreleaserConfig build test publish jreleaserFullRelease | ||
env: | ||
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }} | ||
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }} | ||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME }} | ||
JRELEASER_MAVENCENTRAL_SONATYPE_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_SONATYPE_TOKEN }} | ||
|
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,16 @@ | ||
# dlt-core | ||
|
||
dlt-core is a kotlin library to parse autosar dlt files. | ||
|
||
It currently only supports dlt version 1. | ||
|
||
Usage: | ||
```kotlin | ||
DltMessageParser.parseFile(Path.of("file.dlt")).forEach { | ||
val msg = it.dltMessage as DltMessageV1 | ||
if (msg.extendedHeader?.apIdText != "MYAP") { | ||
return@forEach | ||
} | ||
// do stuff with msg | ||
} | ||
``` |
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,8 +1,12 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jreleaser.model.Active | ||
import org.jreleaser.model.Http | ||
|
||
plugins { | ||
kotlin("jvm").version("2.0.0") | ||
`java-library` | ||
signing | ||
`maven-publish` | ||
id("org.jreleaser") version "1.12.0" | ||
} | ||
|
||
group = "io.github.froks" | ||
|
@@ -21,8 +25,11 @@ tasks.test { | |
} | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
jvmToolchain(21) | ||
explicitApi() | ||
compilerOptions { | ||
jvmTarget = JvmTarget.JVM_1_8 | ||
} | ||
} | ||
|
||
java { | ||
|
@@ -36,6 +43,63 @@ tasks.withType<JavaCompile>().configureEach { | |
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { | ||
kotlinOptions.jvmTarget = "1.8" | ||
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" | ||
compilerOptions { | ||
jvmTarget.set(JvmTarget.JVM_1_8) | ||
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn") | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
from(components["java"]) | ||
pom { | ||
name.set("dlt-core") | ||
description.set("Kotlin based parser library for autosar dlt files") | ||
url.set("https://github.com/froks/dlt-core") | ||
developers { | ||
developer { | ||
id.set("froks") | ||
name.set("Florian Roks") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/froks/dlt-core") | ||
developerConnection.set("scm:git:ssh://github.com:froks/dlt-core.git") | ||
connection.set("scm:git:git://github.com/froks/dlt-core.git") | ||
} | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
setUrl(layout.buildDirectory.dir("staging-deploy")) | ||
} | ||
} | ||
} | ||
|
||
jreleaser { | ||
signing { | ||
active = Active.ALWAYS | ||
armored = true | ||
verify = false | ||
} | ||
deploy { | ||
maven { | ||
mavenCentral.create("sonatype") { | ||
active = Active.ALWAYS | ||
url = "https://central.sonatype.com/api/v1/publisher" | ||
authorization = Http.Authorization.BEARER | ||
stagingRepository("target/staging-deploy") | ||
} | ||
} | ||
} | ||
} |
Empty file.