Skip to content

Commit 10c8146

Browse files
committed
Merge branch 'release/4.0.0'
2 parents 2f50519 + 0394048 commit 10c8146

File tree

155 files changed

+3689
-1954
lines changed

Some content is hidden

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

155 files changed

+3689
-1954
lines changed

AndroidSDK/AndroidManifest.xml

Lines changed: 5 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.leanplum"
3-
android:versionCode="1" android:versionName="1.0">
2+
<manifest package="com.leanplum"
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:versionCode="1"
5+
android:versionName="1.0">
46

5-
<uses-sdk android:minSdkVersion="14" />
6-
7-
<!-- Minimum permissions needed for SDK to work -->
8-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
9-
<uses-permission android:name="android.permission.INTERNET" />
10-
11-
<!-- Permissions for GCM -->
12-
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
13-
<permission android:name="${applicationId}.permission.C2D_MESSAGE"
14-
android:protectionLevel="signature" />
15-
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
16-
17-
<application>
18-
19-
<!-- Leanplum Push Notification Receiver for GCM and FCM -->
20-
<receiver android:name="com.leanplum.LeanplumPushReceiver" android:exported="false"
21-
android:enabled="true">
22-
<intent-filter>
23-
<action android:name="com.leanplum.LeanplumPushListenerService" />
24-
<action android:name="com.leanplum.LeanplumPushFirebaseMessagingService" />
25-
</intent-filter>
26-
</receiver>
27-
<receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:exported="true"
28-
android:enabled="false" android:permission="com.google.android.c2dm.permission.SEND">
29-
<intent-filter>
30-
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
31-
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
32-
<category android:name="${applicationId}"/>
33-
</intent-filter>
34-
</receiver>
35-
36-
<!-- Leanplum Local Push Notification Service-->
37-
<service android:name="com.leanplum.LeanplumLocalPushListenerService" />
38-
39-
<!-- Leanplum GCM Message Handling Service -->
40-
<service android:name="com.leanplum.LeanplumPushListenerService" android:exported="false"
41-
android:enabled="false">
42-
<intent-filter>
43-
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
44-
</intent-filter>
45-
</service>
46-
47-
<!-- Leanplum GCM Instance ID Service -->
48-
<service android:name="com.leanplum.LeanplumPushInstanceIDService" android:exported="false"
49-
android:enabled="false">
50-
<intent-filter>
51-
<action android:name="com.google.android.gms.iid.InstanceID" />
52-
</intent-filter>
53-
</service>
54-
55-
<!-- Leanplum GCM/FCM Registration Service -->
56-
<service android:name="com.leanplum.LeanplumPushRegistrationService" />
57-
58-
<!-- Leanplum FCM Message Handling Service -->
59-
<service android:name="com.leanplum.LeanplumPushFirebaseMessagingService"
60-
android:exported="false" android:enabled="false">
61-
<intent-filter>
62-
<action android:name="com.google.firebase.MESSAGING_EVENT" />
63-
</intent-filter>
64-
</service>
65-
66-
<!-- Leanplum FCM Instance ID Service -->
67-
<service android:name="com.leanplum.LeanplumPushFcmListenerService" android:exported="false"
68-
android:enabled="false">
69-
<intent-filter>
70-
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
71-
</intent-filter>
72-
</service>
73-
74-
<!-- Leanplum Helper for FCM Instance ID Service -->
75-
<service android:name="com.leanplum.LeanplumFcmServiceHelper" android:exported="false"
76-
android:enabled="true">
77-
<intent-filter>
78-
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
79-
</intent-filter>
80-
</service>
81-
82-
<!-- Geofencing Service -->
83-
<service android:name="com.leanplum.ReceiveTransitionsIntentService" />
84-
</application>
7+
<uses-sdk android:minSdkVersion="14"/>
858
</manifest>

AndroidSDK/build.gradle

Lines changed: 6 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'com.jfrog.artifactory'
33
apply plugin: 'maven-publish'
4-
5-
def COMPILE_SDK_VERSION=27
6-
def BUILD_TOOLS_VERSION='27.0.2'
7-
def SUPPORT_LIBRARY_VERSION='27.0.2'
4+
apply from: "../common-methods.gradle"
85

96
allprojects {
107
gradle.projectsEvaluated {
@@ -15,42 +12,23 @@ allprojects {
1512
}
1613

1714
dependencies {
18-
// Compile dependencies will be added as dependency in pom file.
19-
api "com.android.support:support-v4:[22.0.0,${SUPPORT_LIBRARY_VERSION}]"
20-
api "com.android.support:appcompat-v7:[22.0.0,${SUPPORT_LIBRARY_VERSION}]"
21-
22-
// Provided dependencies are optional dependencies and will not show up in pom file.
23-
compileOnly('com.google.android.gms:play-services-gcm:[8.3.0,)') {
24-
exclude module: 'support-v4'
25-
}
26-
compileOnly('com.google.firebase:firebase-messaging:[10.0.0,)') {
27-
exclude module: 'support-v4'
28-
}
29-
compileOnly('com.google.android.gms:play-services-location:[10.0.0,)') {
30-
exclude module: 'support-v4'
31-
}
15+
debugApi project(':AndroidSDKCore')
16+
releaseApi project(':AndroidSDKCore')
3217
}
3318

3419
android {
3520
compileSdkVersion COMPILE_SDK_VERSION
3621
buildToolsVersion BUILD_TOOLS_VERSION
37-
useLibrary 'org.apache.http.legacy'
3822
// publishNonDefault true
3923

4024
defaultConfig {
41-
consumerProguardFiles 'consumer-proguard-rules.pro'
25+
consumerProguardFiles CONSUMER_PROGUARD_FILES
4226
}
4327

4428
buildTypes {
4529
release {
4630
minifyEnabled true
47-
proguardFiles 'proguard-rules.pro'
48-
49-
}
50-
buildTypes.each {
51-
def packageIdentifier = '\"' + (System.getenv("LEANPLUM_PACKAGE_IDENTIFIER") ?: "s") +
52-
'\"'
53-
it.buildConfigField 'String', 'LEANPLUM_PACKAGE_IDENTIFIER', packageIdentifier
31+
proguardFiles PROGUARD_FILES
5432
}
5533
}
5634

@@ -78,100 +56,4 @@ android {
7856
release.setRoot('build-types/release')
7957
}
8058
}
81-
82-
task generateJavadoc(type: Javadoc) {
83-
exclude 'com/leanplum/internal'
84-
exclude 'com/leanplum/messagetemplates'
85-
exclude 'com/leanplum/utils'
86-
exclude 'com/leanplum/views'
87-
source = android.sourceSets.main.java.srcDirs
88-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
89-
destinationDir = file("./javadoc/")
90-
failOnError false
91-
}
92-
93-
def libraryGroupId = 'com.leanplum'
94-
def libraryArtifactId = 'Leanplum'
95-
def libraryVersion = "$System.env.ANDROID_VERSION_STRING"
96-
97-
task makeJar(type: Copy) {
98-
from('build/intermediates/bundles/release/')
99-
into('build/outputs/jar/')
100-
include('classes.jar')
101-
rename('classes.jar', 'AndroidSDK-release.jar')
102-
}
103-
104-
publishing {
105-
publications {
106-
aar(MavenPublication) {
107-
groupId libraryGroupId
108-
version libraryVersion
109-
artifactId libraryArtifactId
110-
111-
artifact("$buildDir/outputs/aar/AndroidSDK-release.aar")
112-
113-
// The publication doesn't know about our dependencies,
114-
// so we have to manually add them to the pom.
115-
pom.withXml {
116-
def dependenciesNode = asNode().appendNode('dependencies')
117-
118-
// Iterate over the compile dependencies (we don't want the test ones),
119-
// adding a <dependency> node for each.
120-
configurations.api.allDependencies.each {
121-
if (it.group != null && it.name != null) {
122-
def dependencyNode = dependenciesNode.appendNode('dependency')
123-
dependencyNode.appendNode('groupId', it.group)
124-
dependencyNode.appendNode('artifactId', it.name)
125-
dependencyNode.appendNode('version', it.version)
126-
}
127-
}
128-
}
129-
}
130-
jar(MavenPublication) {
131-
groupId libraryGroupId
132-
version libraryVersion
133-
artifactId libraryArtifactId
134-
135-
artifact("$buildDir/outputs/jar/AndroidSDK-release.jar")
136-
137-
// The publication doesn't know about our dependencies,
138-
// so we have to manually add them to the pom.
139-
pom.withXml {
140-
asNode().appendNode('packaging', 'aar') // Default to aar packaging.
141-
def dependenciesNode = asNode().appendNode('dependencies')
142-
143-
// Iterate over the compile dependencies (we don't want the test ones),
144-
// adding a <dependency> node for each.
145-
configurations.api.allDependencies.each {
146-
if (it.group != null && it.name != null) {
147-
def dependencyNode = dependenciesNode.appendNode('dependency')
148-
dependencyNode.appendNode('groupId', it.group)
149-
dependencyNode.appendNode('artifactId', it.name)
150-
dependencyNode.appendNode('version', it.version)
151-
}
152-
}
153-
}
154-
}
155-
}
156-
}
157-
158-
if (project.hasProperty('artifactoryUsername') && project.hasProperty('artifactoryPassword')) {
159-
artifactory {
160-
contextUrl = 'http://artifactory-upload.leanplum.com'
161-
publish {
162-
repository {
163-
repoKey = 'libs-snapshot-local'
164-
165-
username = artifactoryUsername
166-
password = artifactoryPassword
167-
}
168-
defaults {
169-
publications('aar', 'jar')
170-
publishArtifacts = true
171-
172-
properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
173-
publishPom = true
174-
}
175-
}
176-
}
177-
}
59+
publishing_task(LEANPLUM_ARTIFACT_ID, 'AndroidSDK')

AndroidSDK/proguard-rules.pro

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,12 @@
332332
}
333333

334334
-keep class com.leanplum.utils.BitmapUtil { public private protected *; }
335-
335+
-keep class com.leanplum.LeanplumPushServiceFcm { *; }
336+
-keep class com.leanplum.LeanplumPushService { *; }
337+
-keep class com.leanplum.LeanplumFcmProvider { *; }
338+
-keep class com.leanplum.LeanplumCloudMessagingProvider{ *; }
339+
-keep class com.leanplum.LeanplumGcmProvider { *; }
340+
-keep class com.leanplum.LeanplumPushServiceGcm { *; }
336341
-keep class com.leanplum.LocationManagerImplementation { *; }
337342

338343
-keep class com.leanplum.messagetemplates.BaseMessageOptions { *; }

AndroidSDK/src/com/leanplum/activities/LeanplumAccountAuthenticatorActivity.java

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)