Migrate importing tests to new configuration management

This commit is contained in:
Andrey Uskov
2018-11-21 22:06:50 +03:00
parent 903a048fcd
commit ef6aae0f4a
16 changed files with 299 additions and 365 deletions
@@ -0,0 +1,34 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
defaultConfig {
applicationId "jetbrains.org.myapplication"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation project(':shared')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.0-rc-146"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
@@ -0,0 +1,24 @@
buildscript {
ext.kotlin_version = '1.3.0-rc-146'
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
@@ -0,0 +1,2 @@
include ':app'
include ':shared'
@@ -0,0 +1,25 @@
apply plugin: 'kotlin-multiplatform'
kotlin {
targets {
fromPreset(presets.jvm, 'android')
fromPreset(presets.iosArm64, 'iOS') {
compilations.main.outputKinds('FRAMEWORK')
}
}
sourceSets {
commonMain.dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
androidMain.dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib'
}
}
}
configurations {
compileClasspath
}
@@ -0,0 +1,33 @@
buildscript {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
}
apply plugin: 'kotlin-multiplatform'
kotlin {
sourceSets {
jvmMain {
dependencies {
implementation files("a", "b")
}
}
}
targets {
fromPreset(presets.jvmWithJava, 'jvm')
}
}
@@ -0,0 +1,15 @@
apply plugin: 'kotlin-multiplatform'
kotlin {
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
api project(':bbb')
}
}
}
targets {
fromPreset(presets.jvm, 'jvm')
}
}
@@ -0,0 +1,16 @@
apply plugin: 'kotlin-multiplatform'
kotlin {
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
api project(':ccc')
}
}
}
targets {
fromPreset(presets.jvm, 'jvm')
}
}
@@ -0,0 +1,18 @@
buildscript {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
}
@@ -0,0 +1,15 @@
apply plugin: 'kotlin-multiplatform'
kotlin {
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
}
}
targets {
fromPreset(presets.jvm, 'jvm')
}
}
@@ -0,0 +1 @@
include 'aaa', 'bbb', 'ccc'
@@ -0,0 +1,29 @@
apply plugin: 'kotlin-multiplatform'
kotlin {
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
implementation project(':lib')
}
}
main {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
}
}
jsMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
}
}
}
targets {
fromPreset(presets.jvmWithJava, 'jvm')
fromPreset(presets.js, 'js')
}
}
apply plugin: 'application'
mainClassName = 'com.example.app.JvmGreeterKt'
@@ -0,0 +1,18 @@
buildscript {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
}
@@ -0,0 +1,25 @@
apply plugin: 'kotlin-multiplatform'
kotlin {
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
}
jvmMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
}
}
jsMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
}
}
}
targets {
fromPreset(presets.jvm, 'jvm')
fromPreset(presets.js, 'js')
}
}
@@ -0,0 +1 @@
include 'lib', 'app'
@@ -0,0 +1,33 @@
buildscript {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-146"
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
}
apply plugin: 'kotlin-multiplatform'
kotlin {
sourceSets {
jvmMain {
dependencies {
implementation 'my.lib:unresolved'
}
}
}
targets {
fromPreset(presets.jvmWithJava, 'jvm')
}
}