Kaitai Gradle Plugin

Gradle plugin for [Kaitai](http://kaitai.io/): declarative language to generate binary data parsers

License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

name.valery1707.kaitai
ArtifactId

ArtifactId

kaitai-gradle-plugin
Last Version

Last Version

0.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

Kaitai Gradle Plugin
Gradle plugin for [Kaitai](http://kaitai.io/): declarative language to generate binary data parsers
Project URL

Project URL

https://github.com/valery1707/kaitai-gradle-plugin
Source Code Management

Source Code Management

https://github.com/valery1707/kaitai-gradle-plugin

Download kaitai-gradle-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/name.valery1707.kaitai/kaitai-gradle-plugin/ -->
<dependency>
    <groupId>name.valery1707.kaitai</groupId>
    <artifactId>kaitai-gradle-plugin</artifactId>
    <version>0.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/name.valery1707.kaitai/kaitai-gradle-plugin/
implementation 'name.valery1707.kaitai:kaitai-gradle-plugin:0.1.3'
// https://jarcasting.com/artifacts/name.valery1707.kaitai/kaitai-gradle-plugin/
implementation ("name.valery1707.kaitai:kaitai-gradle-plugin:0.1.3")
'name.valery1707.kaitai:kaitai-gradle-plugin:jar:0.1.3'
<dependency org="name.valery1707.kaitai" name="kaitai-gradle-plugin" rev="0.1.3">
  <artifact name="kaitai-gradle-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='name.valery1707.kaitai', module='kaitai-gradle-plugin', version='0.1.3')
)
libraryDependencies += "name.valery1707.kaitai" % "kaitai-gradle-plugin" % "0.1.3"
[name.valery1707.kaitai/kaitai-gradle-plugin "0.1.3"]

Dependencies

runtime (1)

Group / Artifact Type Version
name.valery1707.kaitai : kaitai-maven-plugin jar 0.1.4

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.assertj : assertj-core jar 2.9.0

Project Modules

There are no modules declared in this project.

Maven Central Gradle Plugin Portal License

Build Status CircleCI

Gradle plugin for http://kaitai.io/

Usage

Minimum configuration

  • Add plugin dependency
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath("name.valery1707.kaitai:kaitai-gradle-plugin:0.1.2")
    }
}
  • Apply plugin
apply plugin: 'name.valery1707.kaitai'
  • Add Kaitai compile dependencies
repositories {
    jcenter()
}
dependencies {
    implementation("io.kaitai:kaitai-struct-runtime:0.8")
}
  • Configure plugin (all params are optional)
kaitai {
    packageName = 'preferred.package.name'
}

Plugin parameters

Name Type Since Description
skip boolean 0.1.0 Skip plugin execution (don't read/validate any files, don't generate any java types).

Default: false
url java.net.URL 0.1.0 Direct link onto KaiTai universal zip archive.

Default: Detected from version
version String 0.1.0 Version of KaiTai library.

Default: 0.8
cacheDir java.io.File 0.1.0 Cache directory for download KaiTai library.

Default: build/tmp/kaitai-cache
sourceDirectory java.io.File 0.1.0 Source directory with Kaitai Struct language files.

Default: src/main/resources/kaitai
includes String[] 0.1.0 Include wildcard pattern list.

Default: ["*.ksy"]
excludes String[] 0.1.0 Exclude wildcard pattern list.

Default: []
output java.io.File 0.1.0 Target directory for generated Java source files.

Default: build/generated/kaitai
packageName String 0.1.0 Target package for generated Java source files.

Default: Trying to get project's group or kaitai otherwise
executionTimeout Long 0.1.1 Timeout for execution operations.

Default: 5000
fromFileClass String 0.1.1 Classname with custom KaitaiStream implementations for static builder fromFile(...)
opaqueTypes Boolean 0.1.1 Allow use opaque (external) types in ksy. See more in documentation.

Developments

For debug on integration tests you must previously call some gradle tasks: jar assemble pluginUnderTestMetadata

Deploy new version manually:

  1. Update version inside this files:
    • build.gradle.kts: from 0.1.3-SNAPSHOT into 0.1.3
    • README.md: from 0.1.2 into 0.1.3
    • CHANGELOG.md: create new block for 0.1.3
  2. Commit with Prepare release 0.1.3
  3. Prepare gradle.properties from gradle-template.properties
  4. Run ./gradlew clean build uploadArchives
  5. Open Staging Repository
  6. Search for namevalery1707 and select founded
  7. Check content on tab Content
  8. Press Close with comment Release version 0.1.3
  9. Wait for operation:
  10. On failure:
    • Check reason on tab Activity
    • Press Drop with some comment
  11. Press Release with comment Release version 0.1.3
  12. Check exists for Gradle API keys in local configuration
  13. Run ./gradlew publishPlugins
  14. Update version into 0.1.4-SNAPSHOT and commit with Prepare for next development iteration

Versions

Version
0.1.3
0.1.2
0.1.1
0.1.0