[go: nahoru, domu]

Skip to content

Commit

Permalink
Remove native-image, add ci workflow, update copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
valaphee committed Feb 3, 2023
1 parent ae63590 commit 2ee7b54
Show file tree
Hide file tree
Showing 18 changed files with 381 additions and 818 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: gradle
- uses: gradle/wrapper-validation-action@v1
- run: chmod +x gradlew
- uses: gradle/gradle-build-action@v2
with:
arguments: build
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/libs/protod.jar
asset_name: protod.jar
asset_content_type: application/java-archive
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# protod

![license](https://img.shields.io/badge/License-Apache_2.0-blue.svg)
![version](https://img.shields.io/badge/Version-1.1.1-green.svg)

Protobuf Decompiler

## Usage

protod is a command-line tool, and does not have a GUI.

```
Usage: protod options_list
Arguments:
input -> Input file { String }
output -> Output path { String }
Options:
--exclude [google/protobuf/compiler/plugin.proto, google/protobuf/any.proto, google/protobuf/api.proto, google/protobuf/descriptor.proto, google/protobuf/duration.proto, google/protobuf/empty.proto, google/protobuf/field_mask.proto, google/protobuf/source_context.proto, google/protobuf/struct.proto, google/protobuf/timestamp.proto, google/protobuf/type.proto, google/protobuf/wrappers.proto] -> Exclude files { String }
--help, -h -> Usage info
```
Binary file removed app.ico
Binary file not shown.
38 changes: 15 additions & 23 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Valaphee.
* Copyright (c) 2022-2023, Valaphee.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,44 +17,36 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
application
id("com.palantir.git-version") version "0.12.3"
kotlin("jvm") version "1.6.21"
id("org.graalvm.buildtools.native") version "0.9.4"
signing
id("com.github.johnrengelman.shadow") version "7.0.0"
id("com.palantir.git-version") version "0.15.0"
kotlin("jvm") version "1.8.10"
}

group = "com.valaphee"
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
val details = versionDetails()
version = "${details.lastTag}.${details.commitDistance}"

repositories {
mavenCentral()
mavenLocal()
}
repositories { mavenCentral() }

dependencies {
implementation("com.google.protobuf:protobuf-kotlin:3.20.1")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:1.6.20")
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.4")
implementation("com.google.protobuf:protobuf-kotlin:3.21.12")
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.5")
}

tasks {
withType<JavaCompile> {
sourceCompatibility = "16"
targetCompatibility = "16"
sourceCompatibility = "17"
targetCompatibility = "17"
}

withType<KotlinCompile>().configureEach { kotlinOptions { jvmTarget = "16" } }
withType<KotlinCompile>().configureEach { kotlinOptions { jvmTarget = "17" } }

build { dependsOn(shadowJar) }

withType<Test> { useJUnitPlatform() }
jar { manifest { attributes(mapOf("Main-Class" to "com.valaphee.protod.MainKt")) } }

nativeBuild {
agent.set(true)
shadowJar {
archiveFileName.set("protod.jar")
}
}

application { mainClass.set("com.valaphee.protod.MainKt") }

signing { useGpgCmd() }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 2ee7b54

Please sign in to comment.