アプリ開発備忘録

PlayStationMobile、Android、UWPの開発備忘録

Gradle

protobuf-grpcのJVMコード生成がいつまでもNullアノテーションに対応しないので無理矢理対応させる

protobuf, gRPCを使っているサーバーと通信するために公式が用意しているコード生成を使用しています。 https://github.com/protocolbuffers/protobuf/tree/master/java https://github.com/grpc/grpc-java https://github.com/grpc/grpc-kotlin (バックエン…

KotlinでGradleのプラグインを作成し、タスクを作成する

Gradleのプラグインを作成してみたくなったので、作ってみた。以下のリポジトリにコードがあるが、その主要点を書き残す。 https://github.com/matsudamper/kotlin-gradle-plugin-example プラグイン側 build.gradle.kts plugins { // 現状ではGradle Kotlin…

【kts編】KotlinをGradleでビルド

groovy編 https://matsudamper.hatenablog.com/entry/2019/09/17/064542 コード tasks.withType(Jar::class) { manifest { attributes["Main-Class"] = "package.to.MainKt" } from( configurations.runtimeClasspath.map { it.toList().map { if(it.isDirec…