1414 * limitations under the License.
1515 */
1616
17+ import gradle.Config
18+
1719apply plugin : ' com.android.library'
1820apply plugin : ' com.novoda.bintray-release'
19-
20- buildscript {
21- repositories {
22- jcenter()
23- }
24- dependencies {
25- classpath ' com.novoda:bintray-release:0.5.0'
26- }
27- }
2821apply plugin : ' jacoco'
2922
3023jacoco {
3124 toolVersion = " 0.7.4.201502262128"
3225}
26+
3327task jacocoTestReport (type : JacocoReport ,
3428 dependsOn : [' testDebugUnitTest' , ' createDebugCoverageReport' ]) {
3529
@@ -50,13 +44,13 @@ task jacocoTestReport(type: JacocoReport,
5044}
5145
5246android {
53- compileSdkVersion 25
47+ compileSdkVersion Config . COMPILE_SDK
5448
5549 defaultConfig {
56- minSdkVersion 9
57- targetSdkVersion 25
58- versionCode 1
59- versionName " 1.2.6 "
50+ minSdkVersion Config . MIN_SDK
51+ targetSdkVersion Config . TARGET_SDK
52+ versionCode Config . VERSION_CODE
53+ versionName Config . VERSION_NAME
6054
6155 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
6256 }
@@ -80,30 +74,30 @@ android {
8074}
8175
8276dependencies {
83- compile ' com.android.support:recyclerview-v7:25.3.1 '
77+ implementation Config . RECYCLER_VIEW
8478
85- testCompile ' junit:junit:4.12'
86- testCompile ' org.mockito:mockito-core:2.9.0'
79+ testImplementation ' junit:junit:4.12'
80+ testImplementation ' org.mockito:mockito-core:2.9.0'
8781
88- androidTestCompile ' org.mockito:mockito-android:2.7.22 '
89- androidTestCompile " com.android.support.test:runner:1.0.1"
90- androidTestCompile " com.android.support.test:rules:1.0.1"
82+ androidTestImplementation ' org.mockito:mockito-android:2.8.47 '
83+ androidTestImplementation " com.android.support.test:runner:1.0.1"
84+ androidTestImplementation " com.android.support.test:rules:1.0.1"
9185}
9286
9387publish {
94- userOrg = ' devahamed '
95- groupId = ' com.github.devahamed '
96- artifactId = ' multi-view-adapter '
97- repoName = ' MultiViewAdapter '
98- publishVersion = ' 1.2.6 '
99- desc = ' Recyclerview Adapter library to create composable view holders '
100- website = ' https://github.com/DevAhamed/MultiViewAdapter '
88+ userOrg = Config . USER_ORG
89+ groupId = Config . GROUP_ID
90+ artifactId = Config . ARTIFACT_ID_CORE
91+ publishVersion = Config . PUBLISH_VERSION
92+ repoName = Config . REPO_NAME
93+ desc = Config . DESC
94+ website = Config . WEBSITE
10195}
10296
10397afterEvaluate { project ->
10498
105- if (project. getPlugins(). hasPlugin(' com.android.application' ) ||
106- project . getPlugins() . hasPlugin(' com.android.library' )) {
99+ if (project. getPlugins(). hasPlugin(' com.android.application' ) || project . getPlugins().
100+ hasPlugin(' com.android.library' )) {
107101
108102 task androidJavadocs(type : Javadoc ) {
109103 source = android. sourceSets. main. java. source
@@ -120,12 +114,12 @@ afterEvaluate { project ->
120114 from android. sourceSets. main. java. source
121115 }
122116 } else {
123- task sourcesJar(type : Jar , dependsOn :classes) {
117+ task sourcesJar(type : Jar , dependsOn : classes) {
124118 classifier = ' sources'
125119 from sourceSets. main. allSource
126120 }
127121
128- task javadocJar(type : Jar , dependsOn :javadoc) {
122+ task javadocJar(type : Jar , dependsOn : javadoc) {
129123 classifier = ' javadoc'
130124 from javadoc. destinationDir
131125 }
@@ -140,8 +134,8 @@ afterEvaluate { project ->
140134 }
141135
142136 artifacts {
143- if (project. getPlugins(). hasPlugin(' com.android.application' ) ||
144- project . getPlugins() . hasPlugin(' com.android.library' )) {
137+ if (project. getPlugins(). hasPlugin(' com.android.application' ) || project . getPlugins().
138+ hasPlugin(' com.android.library' )) {
145139 archives androidSourcesJar
146140 archives androidJavadocsJar
147141 } else {
0 commit comments