Skip to content

Commit

Permalink
Improve builds and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinMoskala committed Jun 4, 2017
1 parent 63f44ae commit 5908038
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 54 deletions.
1 change: 0 additions & 1 deletion activitystarter-compiler/build.gradle
Expand Up @@ -5,7 +5,6 @@ buildscript {

dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}

repositories {
Expand Down
4 changes: 0 additions & 4 deletions activitystarter-parceler-arg-converter/build.gradle
@@ -1,8 +1,4 @@
buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
Expand Down
5 changes: 0 additions & 5 deletions activitystarter/build.gradle
@@ -1,13 +1,8 @@
import org.gradle.internal.jvm.Jvm

buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}

Expand Down
31 changes: 15 additions & 16 deletions build.gradle
@@ -1,3 +1,16 @@
ext {
minSdkVersion = 9
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.2'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
}

ext.androidToolsVersion = '25.2.0'
ext.supportLibraryVersion = '25.1.0'
ext.kotlinVersion = '1.1.0'

subprojects { project ->
group = GROUP
version = VERSION_NAME
Expand Down Expand Up @@ -30,29 +43,15 @@ subprojects { project ->
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
}

ext {
minSdkVersion = 9
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.2'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
}

ext.androidToolsVersion = '25.2.0'
ext.supportLibraryVersion = '25.1.0'
ext.kotlinVersion = '1.1.0'

ext.deps = [
kotlin : "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion",
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
Expand Down
6 changes: 0 additions & 6 deletions sample/app/build.gradle
@@ -1,9 +1,3 @@
buildscript {
repositories {
mavenCentral()
}
}

apply plugin: 'com.android.application'

android {
Expand Down
17 changes: 2 additions & 15 deletions sample/kotlinapp/build.gradle
@@ -1,15 +1,6 @@
buildscript {
ext.kotlin_version = '1.0.6'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'

android {
Expand Down Expand Up @@ -37,10 +28,6 @@ android {
}
}

kapt {
generateStubs = true
}

dependencies {
compile project(':activitystarter')
kapt project(':activitystarter-compiler')
Expand All @@ -53,7 +40,7 @@ dependencies {
compile deps.supportAppcompatv7
compile deps.supportDesign
compile deps.jodaTime
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"

androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
Expand Down
7 changes: 0 additions & 7 deletions test_all.sh

This file was deleted.

9 changes: 9 additions & 0 deletions testall.sh
@@ -0,0 +1,9 @@
#!/bin/bash

# Needs opened Device
if ./gradlew :activitystarter:test -i && ./gradlew :activitystarter-compiler:test -i && ./gradlew :sample:app:connectedDebugAndroidTest && ./gradlew :sample:kotlinapp:connectedDebugAndroidTest;
then
echo "Success";
else
echo "Nope";
fi

0 comments on commit 5908038

Please sign in to comment.