|
| 1 | +/* |
| 2 | + * build.gradle |
| 3 | + * |
| 4 | + * Copyright (c) 2018 Button, Inc. (https://usebutton.com) |
| 5 | + * |
| 6 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | + * of this software and associated documentation files (the "Software"), to deal |
| 8 | + * in the Software without restriction, including without limitation the rights |
| 9 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | + * copies of the Software, and to permit persons to whom the Software is |
| 11 | + * furnished to do so, subject to the following conditions: |
| 12 | + * |
| 13 | + * The above copyright notice and this permission notice shall be included in all |
| 14 | + * copies or substantial portions of the Software. |
| 15 | + * |
| 16 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | + * SOFTWARE. |
| 23 | + * |
| 24 | + */ |
| 25 | + |
| 26 | +apply plugin: 'com.android.library' |
| 27 | +apply plugin: 'com.jfrog.bintray' |
| 28 | + |
| 29 | +group = 'com.usebutton.merchant' |
| 30 | +version = sdkVersionName |
| 31 | + |
| 32 | +apply plugin: 'com.github.dcendents.android-maven' |
| 33 | + |
| 34 | +android { |
| 35 | + compileSdkVersion 26 |
| 36 | + buildToolsVersion '26.0.3' |
| 37 | + |
| 38 | + defaultConfig { |
| 39 | + minSdkVersion 15 |
| 40 | + targetSdkVersion 26 |
| 41 | + versionCode 1 |
| 42 | + versionName "1.0" |
| 43 | + |
| 44 | + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| 45 | + } |
| 46 | + |
| 47 | + buildTypes { |
| 48 | + release { |
| 49 | + minifyEnabled false |
| 50 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 51 | + } |
| 52 | + } |
| 53 | + |
| 54 | + testOptions { |
| 55 | + unitTests.returnDefaultValues = true |
| 56 | + } |
| 57 | +} |
| 58 | + |
| 59 | +ext { |
| 60 | + supportLibVersion = '26.1.0' |
| 61 | + playServicesVersion = '12.0.0' |
| 62 | + |
| 63 | + junitVersion = '4.12' |
| 64 | + mockitoVersion = '2.16.0' |
| 65 | + espressoVersion = '3.0.1' |
| 66 | +} |
| 67 | + |
| 68 | +dependencies { |
| 69 | + implementation fileTree(dir: 'libs', include: ['*.jar']) |
| 70 | + |
| 71 | + implementation "com.android.support:support-annotations:$supportLibVersion" |
| 72 | + implementation "com.google.android.gms:play-services-ads:$playServicesVersion" |
| 73 | + testImplementation "junit:junit:$junitVersion" |
| 74 | + testImplementation "org.mockito:mockito-core:$mockitoVersion" |
| 75 | + testImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0' |
| 76 | + testImplementation 'org.json:json:20171018' |
| 77 | + androidTestImplementation 'com.android.support.test:runner:1.0.1' |
| 78 | + androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion" |
| 79 | + androidTestImplementation "org.mockito:mockito-android:$mockitoVersion" |
| 80 | +} |
| 81 | + |
| 82 | +bintray { |
| 83 | + user = project.hasProperty('bintrayUsername') ? project.property('bintrayUsername') : System.getenv('BINTRAY_USER') |
| 84 | + key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') |
| 85 | + |
| 86 | + configurations = ['archives'] |
| 87 | + publish = true |
| 88 | + override = sdkVersionName.endsWith("-SNAPSHOT") |
| 89 | + |
| 90 | + pkg { |
| 91 | + repo = 'Internal' |
| 92 | + name = 'android-merchant-library' |
| 93 | + desc = "Button Merchant Library for Android v${sdkVersionName}" |
| 94 | + userOrg = 'button' |
| 95 | + websiteUrl = 'https://github.com/button/button-merchant-android' |
| 96 | + issueTrackerUrl = 'https://github.com/button/button-merchant-android/issues' |
| 97 | + vcsUrl = 'https://github.com/button/button-merchant-android.git' |
| 98 | + labels = ['aar', 'android', 'button'] |
| 99 | + publicDownloadNumbers = false |
| 100 | + licenses = ['MIT'] |
| 101 | + |
| 102 | + version { |
| 103 | + name = sdkVersionName |
| 104 | + } |
| 105 | + } |
| 106 | +} |
0 commit comments