Skip to content

Commit 558a4cd

Browse files
Merge pull request #10 from charlie-mcknight/jitpack
[MMC-1891] Updates to build and readme for jitpack
2 parents 6aef2ef + 3c2cd6d commit 558a4cd

File tree

3 files changed

+71
-15
lines changed

3 files changed

+71
-15
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ Create and update your Mailchimp contacts from your Android app. The Mailchimp S
2020

2121
Coming Soon
2222

23+
### Adding The Mailchimp SDK to your Project
24+
25+
First, add https://jitpack.io to your list of maven repositories if it's not already present. Ex. This is an list of Gradle repositories that contains jitpack
26+
27+
```gradle
28+
repositories {
29+
mavenCentral()
30+
maven { url 'https://jitpack.io' } // <-- New repository
31+
}
32+
```
33+
34+
Next add the Mailchimp SDK to your list of dependencies. Below is a gradle example
35+
36+
```gradle
37+
implementation 'com.github.mailchimp:Mailchimp-SDK-Android:0.1.0'
38+
```
39+
2340
### Initializing the SDK
2441

2542
The first step is to create the configuration object. The configuration object has three different fields.

mailchimp-sdk-api/build.gradle

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,36 @@
99
* limitations under the License.
1010
*/
1111

12-
apply plugin: 'java-library'
13-
apply plugin: 'kotlin'
12+
apply plugin: 'com.android.library'
13+
apply plugin: 'kotlin-android'
14+
apply plugin: 'kotlin-android-extensions'
15+
16+
android {
17+
compileSdkVersion 28
18+
19+
20+
defaultConfig {
21+
minSdkVersion 21
22+
targetSdkVersion 28
23+
versionCode 1
24+
versionName "1.0"
25+
26+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
27+
28+
}
29+
30+
buildTypes {
31+
release {
32+
minifyEnabled false
33+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
34+
}
35+
}
36+
37+
testOptions {
38+
unitTests.returnDefaultValues = true
39+
}
40+
41+
}
1442

1543
dependencies {
1644
implementation fileTree(dir: 'libs', include: ['*.jar'])
@@ -24,19 +52,6 @@ dependencies {
2452
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0"
2553
}
2654

27-
sourceCompatibility = "7"
28-
targetCompatibility = "7"
29-
3055
repositories {
3156
mavenCentral()
3257
}
33-
compileKotlin {
34-
kotlinOptions {
35-
jvmTarget = "1.8"
36-
}
37-
}
38-
compileTestKotlin {
39-
kotlinOptions {
40-
jvmTarget = "1.8"
41-
}
42-
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!--
2+
~ Licensed under the Mailchimp Mobile SDK License Agreement (the "License");
3+
~ you may not use this file except in compliance with the License. Unless
4+
~ required by applicable law or agreed to in writing, software distributed
5+
~ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
6+
~ OR CONDITIONS OF ANY KIND, either or express or implied.
7+
~
8+
~ See the License for the specific language governing permissions and
9+
~ limitations under the License.
10+
-->
11+
12+
<!--
13+
~ Licensed under the Mailchimp Mobile SDK License Agreement (the "License");
14+
~ you may not use this file except in compliance with the License. Unless
15+
~ required by applicable law or agreed to in writing, software distributed
16+
~ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
17+
~ OR CONDITIONS OF ANY KIND, either or express or implied.
18+
~
19+
~ See the License for the specific language governing permissions and
20+
~ limitations under the License.
21+
-->
22+
23+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
24+
package="com.mailchimp.sdk.api"/>

0 commit comments

Comments
 (0)