kotlin-serialization 折腾记录

这个玩意儿呢,因为是kotlin官方支持的,体验一下

配置代码:

bulid.gradle
buildscript {
ext.kotlin_version = '1.3.50'
repositories { jcenter() }

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
}
}

plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
id "com.github.johnrengelman.shadow" version "5.1.0"
}

apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlinx-serialization'
apply plugin: "com.github.johnrengelman.shadow"

version "1.0.0"

repositories {
mavenCentral()
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
}

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlinx:kotlinx-serialization-runtime:+"
api fileTree(dir: 'libs', include: ['*.jar'])
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}



gradle.properties
kotlin.code.style=official
mainKotlinVersion=1.3.50
mainLibVersion=0.13.0

先写这么多,这个至少能通过编译了

发表评论

邮箱地址不会被公开。 必填项已用*标注