Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 1 | buildscript { |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 2 | ext.snapshot_version = '1.1-SNAPSHOT' |
| 3 | |
| 4 | repositories { |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame^] | 5 | mavenLocal() |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 6 | mavenCentral() |
| 7 | } |
| 8 | |
| 9 | dependencies { |
| 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$snapshot_version" |
| 11 | classpath "org.jetbrains.kotlinx:kotlinx-serialization:$snapshot_version" |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame^] | 12 | classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.2' |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 13 | } |
| 14 | } |
| 15 | |
| 16 | group 'org.jetbrains.kotlinx' |
| 17 | version "$snapshot_version" |
| 18 | |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 19 | apply plugin: 'kotlin' |
| 20 | apply plugin: 'kotlin-serialization' |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 21 | |
| 22 | repositories { |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame^] | 23 | mavenLocal() |
| 24 | mavenCentral() |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 25 | } |
| 26 | |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame^] | 27 | apply plugin: 'maven-publish' |
| 28 | |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 29 | publishing { |
| 30 | publications { |
| 31 | mavenJava(MavenPublication) { |
| 32 | from components.java |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame^] | 37 | apply plugin: 'com.google.protobuf' |
| 38 | |
| 39 | protobuf { |
| 40 | protoc { |
| 41 | // Download from repositories |
| 42 | artifact = 'com.google.protobuf:protoc:3.0.0' |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | test { |
| 47 | dependsOn 'generateTestProto' |
| 48 | } |
| 49 | |
| 50 | clean { |
| 51 | delete protobuf.generatedFilesBaseDir |
| 52 | } |
| 53 | |
| 54 | sourceSets { |
| 55 | test { |
| 56 | java { |
| 57 | srcDirs += file("${protobuf.generatedFilesBaseDir}/test/java") |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 63 | dependencies { |
| 64 | compile "org.jetbrains.kotlin:kotlin-stdlib:${snapshot_version}" |
| 65 | compile "org.jetbrains.kotlin:kotlin-reflect:${snapshot_version}" |
| 66 | |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame^] | 67 | testCompile 'com.google.protobuf:protobuf-java:3.0.0' |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 68 | testCompile group: 'junit', name: 'junit', version: '4.4' |
Leonid Startsev | 6d6aaf4 | 2017-07-31 16:56:31 +0300 | [diff] [blame] | 69 | testCompile 'io.kotlintest:kotlintest:2.0.4' |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 70 | } |