Skip to content

Commit

Permalink
Merge pull request #20 from CleverTap/1.2.1
Browse files Browse the repository at this point in the history
SDK-560: Update CT Android SDK to v4.1.1 and prep for release
  • Loading branch information
darshanclevertap authored May 12, 2021
2 parents 8da08bd + 4e05247 commit ed47537
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 170 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGE LOG

Version 1.2.1 (11 May, 2021)
===================================
*(Supports analytics-android 4.9.4 and CleverTap 4.1.1)*

Version 1.2.0 (1 October, 2020)
===================================
*(Supports analytics-android 4.5.0 and CleverTap 4.0.0)*
Expand Down
11 changes: 0 additions & 11 deletions RELEASING.md

This file was deleted.

194 changes: 113 additions & 81 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'

buildscript {
repositories {
maven {
url "https://maven.google.com"
}
mavenCentral()
jcenter()
flatDir {
dirs 'libs'
}
Expand All @@ -13,51 +17,50 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.google.gms:google-services:4.3.3'
}
}

ext {
bintrayRepo = 'Maven'
bintrayName = 'clevertap-segment-integration'
org = 'clevertap'
Repo = 'Maven'

publishedGroupId = 'com.clevertap.android'
libraryName = 'clevertap-segment-integration'
artifact = 'clevertap-segment-android'

libraryDescription = 'CleverTap Integration for Segment Android Analytics'

siteUrl = 'https://github.com/CleverTap/clevertap-segment-android'
gitUrl = 'https://github.com/CleverTap/clevertap-segment-android.git'

libraryVersion = '1.2.0'
libraryVersion = '1.2.1'

developerId = 'clevertap'
developerName = 'CleverTap'
developerEmail = 'support@clevertap.com'

licenseName = 'The MIT License (MIT)'
licenseUrl = 'http://opensource.org/licenses/MIT'
allLicenses = ["MIT"]
}

ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.secretKeyRingFile"] = ''
ext["ossrhUsername"] = ''
ext["ossrhPassword"] = ''
ext["sonatypeStagingProfileId"] = ''
ext["developerId"] = ''
ext["developerName"] = ''
ext["developerEmail"] = ''

version = libraryVersion
group = publishedGroupId

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'


android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
compileSdkVersion 30
buildToolsVersion '30.0.3'

defaultConfig {
minSdkVersion 16
targetSdkVersion 29
targetSdkVersion 30
}

compileOptions {
Expand All @@ -68,91 +71,129 @@ android {
testOptions {
unitTests.returnDefaultValues = true
}

libraryVariants.all { variant ->
variant.outputs.all {
if (variant.getName().toLowerCase().contains('release')) {
outputFileName = "${artifact}-${libraryVersion}.aar"
} else if (variant.getName().toLowerCase().contains('debug')) {
outputFileName = "${artifact}-${variant.name}-${libraryVersion}.aar"
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

// Bintray
Properties properties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
userOrg = org
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = false
}
}
properties.each { name, value ->
ext[name] = value
}
}else{
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID')
ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE')
ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME')
ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD')
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID')
}

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release

// You can then customize attributes of the publication as shown below.
groupId publishedGroupId
artifactId artifact

// Add your description here
name libraryName
description libraryDescription
url siteUrl

// Set your license
licenses {
license {
name licenseName
url licenseUrl
version version

artifact sourcesJar

pom {
name = artifact
description = libraryDescription
url = siteUrl
packaging = "aar"
licenses {
license {
name = licenseName
url = licenseUrl
}
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
developers {
developer {
id = developerId
name = developerName
email = developerEmail
}
// Add all other devs here...
}
// Version control info - if you're using GitHub, follow the format as seen here
scm {
connection = 'scm:git:github.com/CleverTap/clevertap-android-sdk.git'
developerConnection = 'scm:git:ssh:github.com/CleverTap/clevertap-android-sdk.git'
url = 'https://github.com/CleverTap/clevertap-android-sdk/tree/master'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl

}
}
// The repository to publish to, Sonatype/MavenCentral
repositories {
maven {
// This is an arbitrary name, you may also use "mavencentral" or
// any other name that's descriptive for you
name = Repo
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
}

signing {
sign publishing.publications
}

dependencies {
repositories {
mavenCentral()
jcenter()
maven {
url "https://maven.google.com"
}

}
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly 'com.segment.analytics.android:analytics:4.5.0'
compileOnly 'com.segment.analytics.android:analytics:4.9.4'
compileOnly 'androidx.annotation:annotation:1.1.0'

implementation 'com.clevertap.android:clevertap-android-sdk:4.0.0'
implementation 'com.clevertap.android:clevertap-android-sdk:4.1.1'

testImplementation 'junit:junit:4.12'
testImplementation('org.robolectric:robolectric:3.0') {
Expand All @@ -178,12 +219,3 @@ dependencies {
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'

}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}
Loading

0 comments on commit ed47537

Please sign in to comment.