Skip to content

Commit 0f3dff4

Browse files
wessmithChuck Greb
authored andcommitted
Private beta
0 parents  commit 0f3dff4

File tree

78 files changed

+5038
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+5038
-0
lines changed

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the ART/Dalvik VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
out/
15+
16+
# Gradle files
17+
.gradle/
18+
build/
19+
20+
# Local configuration file (sdk path, etc)
21+
local.properties
22+
23+
# Proguard folder generated by Eclipse
24+
proguard/
25+
26+
# Log Files
27+
*.log
28+
29+
# Android Studio Navigation editor temp files
30+
.navigation/
31+
32+
# Android Studio captures folder
33+
captures/
34+
35+
# Intellij
36+
*.iml
37+
.idea/*
38+
!.idea/copyright
39+
40+
# Keystore files
41+
*.jks
42+
43+
# External native build folder generated in Android Studio 2.2 and later
44+
.externalNativeBuild
45+
46+
# Google Services (e.g. APIs or Firebase)
47+
google-services.json
48+
49+
# Freeline
50+
freeline.py
51+
freeline/
52+
freeline_project_description.json

.idea/copyright/Button.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
language: android
2+
3+
env:
4+
global:
5+
- ANDROID_API_LEVEL=26
6+
- ANDROID_BUILD_TOOLS_VERSION=26.0.3
7+
8+
before_cache:
9+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
10+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
11+
12+
cache:
13+
directories:
14+
# Android SDK
15+
- $HOME/android-sdk-dl
16+
- $HOME/android-sdk
17+
18+
# Gradle dependencies
19+
- $HOME/.gradle/caches/
20+
- $HOME/.gradle/wrapper/
21+
22+
# Android build cache (see http://tools.android.com/tech-docs/build-cache)
23+
- $HOME/.android/build-cache
24+
25+
#Android Emulator
26+
- $HOME/Library/Android/sdk/system-images/
27+
28+
android:
29+
components:
30+
- tools
31+
- platform-tools
32+
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
33+
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
34+
- android-$ANDROID_API_LEVEL
35+
36+
licenses:
37+
- android-sdk-license-.+
38+
39+
script:
40+
- bash ./scripts/travis/run_tests.sh
41+
42+
after_success:
43+
- bash ./scripts/travis/deploy_to_bintray.sh

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Button
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[![Build Status](https://travis-ci.com/button/button-merchant-android.svg?token=csLDMWdyHoUrMqv9JzCZ&branch=master)](https://travis-ci.com/button/button-merchant-android)
2+
3+
# Button Merchant Android
4+
An open source client library for Button merchants.
5+
6+
**Note:** The Button Merchant library is shared only with priveliged Merchants. Aspects of the documentation, and this repo are incomplete, pending public release. Please see the docs below for usage.
7+
8+
## Documentation
9+
Documentation for the Merchant Library can be found on the [Button Developer site](https://developer.usebutton.com/guides/merchants/android/open-source-merchant-library).
10+
11+
12+
## Build and run the sample app
13+
```bash
14+
git clone https://github.com/button/button-merchant-android.git
15+
cd button-merchant-android
16+
./gradlew clean installDebug
17+
```

build.gradle

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
27+
28+
buildscript {
29+
30+
repositories {
31+
google()
32+
jcenter()
33+
}
34+
dependencies {
35+
classpath 'com.android.tools.build:gradle:3.0.1'
36+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
37+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
38+
39+
// NOTE: Do not place your application dependencies here; they belong
40+
// in the individual module build.gradle files
41+
}
42+
}
43+
44+
allprojects {
45+
repositories {
46+
google()
47+
jcenter()
48+
}
49+
}
50+
51+
task clean(type: Delete) {
52+
delete rootProject.buildDir
53+
}

button-merchant/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

button-merchant/build.gradle

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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+
}

button-merchant/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

0 commit comments

Comments
 (0)