11// Copyright 2017 Sourcerer Inc. All Rights Reserved.
22
33buildscript {
4- ext. kotlin_version = ' 1.1.4-2 '
4+ ext. kotlin_version = ' 1.1.51 '
55 repositories {
66 mavenCentral()
77 jcenter()
88 }
99 dependencies {
1010 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
11- classpath " com.google.protobuf:protobuf-gradle-plugin:0.8.1 "
12- classpath " org.junit.platform:junit-platform-gradle-plugin:1.0.0-RC2 "
11+ classpath " com.google.protobuf:protobuf-gradle-plugin:0.8.3 "
12+ classpath " org.junit.platform:junit-platform-gradle-plugin:1.0.1 "
1313 }
1414}
1515
1616plugins {
1717 id ' de.fuerstenau.buildconfig' version ' 1.1.8'
1818}
1919
20-
21-
2220apply plugin : " idea"
2321apply plugin : " java"
2422apply plugin : " kotlin"
@@ -27,19 +25,11 @@ apply plugin: "com.google.protobuf"
2725apply plugin : " org.junit.platform.gradle.plugin"
2826
2927buildConfig {
30- ext. environment = project. hasProperty(' env' ) &&
31- env == ' production' ? ' prod' : ' dev'
32-
3328 clsName = ' BuildConfig'
3429 packageName = ' app'
3530
3631 // API.
37- def apiBasePath = ' https://staging.eng.sourcerer.io/api/commit'
38- if (ext. environment == ' prod' ) {
39- apiBasePath = ' https://sourcerer.io/api/commit'
40- }
41- apiBasePath = project. hasProperty(' api' ) ? api : apiBasePath
42-
32+ def apiBasePath = project. hasProperty(' api' ) ? api : ' https://sourcerer.io/api/commit'
4333 buildConfigField ' String' , ' API_BASE_PATH' , apiBasePath
4434
4535 // Common.
@@ -49,11 +39,21 @@ buildConfig {
4939 buildConfigField ' int' , ' VERSION_CODE' , ' 1'
5040 buildConfigField ' String' , ' VERSION' , ' 0.0.1'
5141
42+ // Logging.
43+ buildConfigField ' String' , ' LOG_LEVEL' , project. hasProperty(' log' ) ? log : ' info'
44+
5245 // Google Analytics.
5346 buildConfigField ' String' , ' GA_BASE_PATH' , ' http://www.google-analytics.com'
5447 buildConfigField ' String' , ' GA_TRACKING_ID' , ' UA-107129190-2'
5548 buildConfigField ' boolean' , ' IS_GA_ENABLED' , ' true'
5649
50+ // Logging.
51+ buildConfigField
' String' ,
' SENTRY_DSN' ,
' https://0263d6473bd24a9ba40e25aa5fb0a242:[email protected] /233260' 52+ buildConfigField ' boolean' , ' PRINT_STACK_TRACE' , ' false'
53+
54+ // Models storage path.
55+ buildConfigField ' String' , ' LIBRARY_MODELS_URL' , ' https://storage.googleapis.com/sourcerer-app/library-models/v1/'
56+
5757 buildConfig
5858}
5959
@@ -65,39 +65,49 @@ junitPlatform {
6565 }
6666}
6767
68+ task cleanData {
69+ delete ' build/libs/data'
70+ delete ' build/kotlin/data'
71+ }
72+
73+ test. dependsOn cleanData
74+
6875mainClassName = " app.MainKt"
6976
7077repositories {
7178 mavenCentral()
7279 jcenter()
7380 maven { url " http://dl.bintray.com/jetbrains/spek" }
81+ flatDir {
82+ dirs ' libs'
83+ }
7484}
7585
7686dependencies {
7787 compile " org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version "
7888 compile " org.jetbrains.kotlin:kotlin-reflect:$kotlin_version "
7989 compile " com.beust:jcommander:1.72"
80- compile ' com.google.protobuf:protobuf-java:3.0 .0'
81- compile group : ' commons-codec' , name : ' commons-codec' , version : ' 1.5'
90+ compile ' com.google.protobuf:protobuf-java:3.4 .0'
91+ compile ' commons-codec: commons-codec: 1.5'
8292 compile ' com.fasterxml.jackson.core:jackson-databind:2.8.9'
8393 compile ' com.fasterxml.jackson.module:jackson-module-kotlin:2.8.9'
8494 compile ' com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.9'
85- compile " io.reactivex.rxjava2:rxjava:2.1.1 "
86- compile ' com.github.kittinunf.fuel:fuel:1.9 .0'
87- compile ' com.github.kittinunf.fuel:fuel-rxjava:1.9 .0'
88- compile group : ' org.eclipse.jgit' , name : ' org.eclipse.jgit' ,
89- version : ' 4.8.0.201706111038-r '
90- compile " org.slf4j:slf4j-nop :1.7.2 "
95+ compile ' io.reactivex.rxjava2:rxjava:2.1.6 '
96+ compile ' com.github.kittinunf.fuel:fuel:1.11 .0'
97+ compile ' com.github.kittinunf.fuel:fuel-rxjava:1.11 .0'
98+ compile ' org.eclipse.jgit: org.eclipse.jgit:4.9.0.201710071750-r '
99+ compile ' org.slf4j:slf4j-nop:1.7.2 '
100+ compile ' io.sentry:sentry :1.6.0 '
91101
92102 testCompile ' org.jetbrains.kotlin:kotlin-test'
93- testCompile ' org.jetbrains.spek:spek-api:1.1.4 '
94- testCompile ' org.junit.platform:junit-platform-runner:1.0.0-RC2 '
95- testRuntime ' org.jetbrains.spek:spek-junit-platform-engine:1.1.4 '
103+ testCompile ' org.jetbrains.spek:spek-api:1.1.5 '
104+ testCompile ' org.junit.platform:junit-platform-runner:1.0.1 '
105+ testRuntime ' org.jetbrains.spek:spek-junit-platform-engine:1.1.5 '
96106}
97107
98108protobuf {
99109 protoc {
100- artifact = " com.google.protobuf:protoc:3.0 .0"
110+ artifact = " com.google.protobuf:protoc:3.4 .0"
101111 }
102112}
103113
0 commit comments