diff --git a/README.md b/README.md index ea89e69..02ffda8 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,23 @@ Create and update your Mailchimp contacts from your Android app. The Mailchimp S Coming Soon +### Adding The Mailchimp SDK to your Project + +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 + +```gradle +repositories { + mavenCentral() + maven { url 'https://jitpack.io' } // <-- New repository +} +``` + +Next add the Mailchimp SDK to your list of dependencies. Below is a gradle example + +```gradle +implementation 'com.github.mailchimp:Mailchimp-SDK-Android:0.1.0' +``` + ### Initializing the SDK The first step is to create the configuration object. The configuration object has three different fields. diff --git a/mailchimp-sdk-api/build.gradle b/mailchimp-sdk-api/build.gradle index 9c67319..d349f8a 100644 --- a/mailchimp-sdk-api/build.gradle +++ b/mailchimp-sdk-api/build.gradle @@ -9,8 +9,36 @@ * limitations under the License. */ -apply plugin: 'java-library' -apply plugin: 'kotlin' +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' + +android { + compileSdkVersion 28 + + + defaultConfig { + minSdkVersion 21 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + testOptions { + unitTests.returnDefaultValues = true + } + +} dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) @@ -24,19 +52,6 @@ dependencies { testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0" } -sourceCompatibility = "7" -targetCompatibility = "7" - repositories { mavenCentral() } -compileKotlin { - kotlinOptions { - jvmTarget = "1.8" - } -} -compileTestKotlin { - kotlinOptions { - jvmTarget = "1.8" - } -} diff --git a/mailchimp-sdk-api/src/main/AndroidManifest.xml b/mailchimp-sdk-api/src/main/AndroidManifest.xml new file mode 100644 index 0000000..02ad357 --- /dev/null +++ b/mailchimp-sdk-api/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + +