Skip to content

Commit

Permalink
begin reorganisation from root to separate sdk module
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Aug 21, 2017
1 parent 1858862 commit 7616d55
Show file tree
Hide file tree
Showing 70 changed files with 92 additions and 59 deletions.
56 changes: 0 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,62 +8,6 @@ buildscript {
}
}

repositories {
jcenter()
}

// Tasks to build and test the android library
apply plugin: 'com.android.library'
android {
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION

defaultConfig {
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

lintOptions {
disable 'DefaultLocale', 'Typos'
abortOnError true
}

}

dependencies {
compile "com.android.support:support-annotations:25.3.1"
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'

androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
}
}

// Disable doclint:
// https://github.com/GPars/GPars/blob/312c5ae87605a0552bc72e22e3b2bd2fa1fdf98c/build.gradle#L208-L214
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
// disable the crazy super-strict doclint tool in Java 8
//noinspection SpellCheckingInspection
options.addStringOption('Xdoclint:none', '-quiet')
}
}

task javadoc(type: Javadoc) {
description = "Generates javadocs, ignoring any doclint errors, and places the artefact in the root of the project"
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
destinationDir = file("docs")
failOnError false
}

// Tasks to release the library to maven central
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

ext {
supportLibVersion = "25.3.1"
supportTestVersion = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ android {
}

dependencies {
compile rootProject
compile project(":sdk")
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile "com.android.support:support-v4:$supportLibVersion"
kotlinExampleCompile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
Expand Down
1 change: 1 addition & 0 deletions sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
63 changes: 63 additions & 0 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
repositories {
jcenter()
}

// Tasks to build and test the android library
apply plugin: 'com.android.library'
android {
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION

defaultConfig {
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

lintOptions {
disable 'DefaultLocale', 'Typos'
abortOnError true
}

}

dependencies {
compile "com.android.support:support-annotations:25.3.1"
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'

androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
}
}

// Disable doclint:
// https://github.com/GPars/GPars/blob/312c5ae87605a0552bc72e22e3b2bd2fa1fdf98c/build.gradle#L208-L214
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
// disable the crazy super-strict doclint tool in Java 8
//noinspection SpellCheckingInspection
options.addStringOption('Xdoclint:none', '-quiet')
}
}

task javadoc(type: Javadoc) {
description = "Generates javadocs, ignoring any doclint errors, and places the artefact in the root of the project"
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
destinationDir = file("docs")
failOnError false
}

// Tasks to release the library to maven central
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

ext {
supportLibVersion = "25.3.1"
supportTestVersion = "0.5"
espressoVersion = "2.2.2"
junitVersion = "4.1.2"
mockitoVersion = "1.10.19"
}
25 changes: 25 additions & 0 deletions sdk/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/jamielynch/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':example', ':testharness'
include ':example', ':testharness', ':sdk'
2 changes: 1 addition & 1 deletion testharness/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {
}

dependencies {
compile rootProject
compile project(":sdk")
compile 'com.android.support:appcompat-v7:25.3.1'

androidTestCompile 'com.android.support.test:runner:0.5', {
Expand Down

0 comments on commit 7616d55

Please sign in to comment.