forked from afollestad/assent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35239b1
commit ec1d3aa
Showing
16 changed files
with
173 additions
and
182 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,50 @@ | ||
ext.versions = [ | ||
minSdk : 14, | ||
compileSdk : 29, | ||
buildTools : '29.0.0', | ||
publishVersion : '2.3.1', | ||
publishVersionCode : 20, | ||
min_sdk: 14, | ||
compile_sdk: 29, | ||
build_tools: "29.0.0", | ||
publish_version: "2.3.1", | ||
publish_version_code: 20 | ||
] | ||
|
||
ext.deps = [ | ||
gradle_plugins: [ | ||
android: "com.android.tools.build:gradle:3.5.3", | ||
spotless: "com.diffplug.spotless:spotless-plugin-gradle:3.27.1", | ||
versions: "com.github.ben-manes:gradle-versions-plugin:0.27.0", | ||
bintray_release: "com.novoda:bintray-release:0.9.2", | ||
kotlin: "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61", | ||
nebula_lint: "com.netflix.nebula:gradle-lint-plugin:16.0.2" | ||
], | ||
|
||
androidx: [ | ||
annotations: "androidx.annotation:annotation:1.1.0", | ||
app_compat: "androidx.appcompat:appcompat:1.1.0", | ||
test: [ | ||
core: "androidx.test:core:1.1.0" | ||
] | ||
], | ||
|
||
gradlePlugin : '3.5.0', | ||
spotlessPlugin : '3.24.2', | ||
versionPlugin : '0.22.0', | ||
kotlin : '1.3.50', | ||
bintrayPlugin : '0.9.1', | ||
material: "com.google.android.material:material:1.0.0", | ||
|
||
timber : '4.7.1', | ||
kotlin: [ | ||
stdlib8: "org.jetbrains.kotlin:kotlin-stdlib-jdk8", | ||
coroutines: [ | ||
core: "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2", | ||
android: "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2" | ||
], | ||
test: [ | ||
mockito: "com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0" | ||
] | ||
], | ||
|
||
junit : '4.12', | ||
mockito : '3.0.0', | ||
mockitoKotlin : '2.1.0', | ||
truth : '1.0', | ||
debug: [ | ||
timber: "com.jakewharton.timber:timber:4.7.1" | ||
], | ||
|
||
androidxAnnotations: '1.1.0', | ||
androidxCore : '1.0.2', | ||
androidxMaterial : '1.0.0', | ||
robolectric : '4.3', | ||
test: [ | ||
junit: "junit:junit:4.13", | ||
robolectric: "org.robolectric:robolectric:4.3.1", | ||
mockito_core: "org.mockito:mockito-core:3.2.4", | ||
truth: "com.google.truth:truth:1.0", | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,17 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply from: '../dependencies.gradle' | ||
ext.module_group = "com.afollestad" | ||
ext.module_name = "assent" | ||
|
||
apply from: '../bintrayconfig.gradle' | ||
|
||
android { | ||
compileSdkVersion versions.compileSdk | ||
buildToolsVersion versions.buildTools | ||
|
||
compileOptions { | ||
if (modulePackageId != null && modulePackageId != '') { | ||
logger.warn('Package for current module: ' + modulePackageId) | ||
kotlinOptions.freeCompilerArgs += ['-module-name', modulePackageId] | ||
} else { | ||
logger.warn('Skipping setting compiler module name, no package to use.') | ||
} | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion versions.minSdk | ||
targetSdkVersion versions.compileSdk | ||
versionCode versions.publishVersionCode | ||
versionName versions.publishVersion | ||
} | ||
} | ||
apply from: rootProject.file("gradle/android_library_config.gradle") | ||
|
||
dependencies { | ||
implementation 'androidx.annotation:annotation:' + versions.androidxAnnotations | ||
implementation 'androidx.appcompat:appcompat:' + versions.androidxCore | ||
implementation 'com.google.android.material:material:' + versions.androidxMaterial | ||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:' + versions.kotlin | ||
implementation 'com.jakewharton.timber:timber:' + versions.timber | ||
implementation deps.androidx.annotations | ||
implementation deps.androidx.app_compat | ||
|
||
testImplementation 'org.robolectric:robolectric:' + versions.robolectric | ||
testImplementation 'junit:junit:' + versions.junit | ||
testImplementation 'org.mockito:mockito-inline:' + versions.mockito | ||
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:' + versions.mockitoKotlin | ||
testImplementation 'com.google.truth:truth:' + versions.truth | ||
} | ||
implementation deps.kotlin.stdlib8 | ||
implementation deps.debug.timber | ||
|
||
apply from: '../spotless.gradle' | ||
testImplementation deps.kotlin.test.mockito | ||
testImplementation deps.test.junit | ||
testImplementation deps.test.robolectric | ||
testImplementation deps.test.truth | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
apply from: '../dependencies.gradle' | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
ext.module_group = "com.afollestad" | ||
ext.module_name = "assentsample" | ||
|
||
android { | ||
compileSdkVersion versions.compileSdk | ||
buildToolsVersion versions.buildTools | ||
|
||
defaultConfig { | ||
applicationId "com.afollestad.assentsample" | ||
minSdkVersion versions.minSdk | ||
targetSdkVersion versions.compileSdk | ||
versionCode versions.publishVersionCode | ||
versionName versions.publishVersion | ||
} | ||
} | ||
apply from: rootProject.file("gradle/android_application_config.gradle") | ||
|
||
dependencies { | ||
implementation project(':library') | ||
|
||
implementation 'androidx.annotation:annotation:' + versions.androidxAnnotations | ||
implementation 'androidx.appcompat:appcompat:' + versions.androidxCore | ||
|
||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:' + versions.kotlin | ||
|
||
implementation 'com.jakewharton.timber:timber:' + versions.timber | ||
implementation deps.androidx.annotations | ||
implementation deps.androidx.app_compat | ||
implementation deps.kotlin.stdlib8 | ||
implementation deps.debug.timber | ||
} |
18 changes: 13 additions & 5 deletions
18
sample/src/main/java/com/afollestad/assentsample/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.