Skip to content

Commit 596f3aa

Browse files
committed
Release 1.0.0
1 parent e92d981 commit 596f3aa

File tree

19 files changed

+564
-143
lines changed

19 files changed

+564
-143
lines changed

.github/workflows/android.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Android CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: set up JDK 1.8
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 1.8
16+
- name: Run CI
17+
run: make ci
18+
- name: Upload artifact
19+
if: github.ref == 'refs/heads/master'
20+
uses: actions/upload-artifact@v1
21+
with:
22+
name: google-analytics-dispatcher.zip
23+
path: release/

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
/captures
77
.externalNativeBuild
88
.cxx
9+
release/
10+
911

1012
/.idea/*
11-
!/.idea/runConfigurations/
13+
!/.idea/runConfigurations/
14+
/maven.properties
15+
/batch-maven-secret-gpg.key

.idea/runConfigurations/build_aar.xml

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

.idea/runConfigurations/dispatcher_test.xml

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

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
1.0
2+
-----
3+
4+
* Dispatcher release.

LICENSE

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

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
all: aar
2+
3+
aar: clean
4+
./gradlew assembleRelease --no-build-cache && \
5+
mkdir -p release/ && \
6+
cp google-analytics-dispatcher/build/outputs/aar/google-analytics-dispatcher-release.aar release/ && \
7+
cp LICENSE release/
8+
9+
clean:
10+
./gradlew clean
11+
12+
test:
13+
./gradlew testDebugUnitTest
14+
15+
test-coverage:
16+
./gradlew testDebugCoverageUnitTest && \
17+
awk -F"," '{ instructions += $$4 + $$5; covered += $$5 } END { print covered, "/", instructions, "instructions covered"; print "Total", 100*covered/instructions "% covered" }' google-analytics-dispatcher/build/test-results/jacoco.csv
18+
19+
lint:
20+
./gradlew lintDebug
21+
22+
ci: lint test-coverage aar

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.batch.android/google-analytics-dispatcher/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.batch.android/google-analytics-dispatcher)
2+
[![Github Action](https://github.com/BatchLabs/android-google-analytics-dispatcher/workflows/Android%20CI/badge.svg)](https://github.com/BatchLabs/android-google-analytics-dispatcher/actions?query=workflow%3A%22Android+CI%22)
3+
4+
Batch.com Android Google Analytics Dispatcher
5+
==================
6+
7+
![Logo](http://batch-doc.s3.amazonaws.com/logo_batch_192.gif)
8+
9+
# About
10+
11+
A "ready-to-go" dispatcher that reflect event from the Batch SDK to the Google Analytics dashboard using UTM tags.
12+
13+
# Requirements
14+
- Android Studio 3.0+
15+
- Android 15+
16+
- Batch Android SDK 1.15.0+
17+
- Play Services Analytics 17.0.0+
18+
19+
# Installation
20+
Gradle (recommended)
21+
22+
```
23+
implementation 'com.batch.android:google-analytics-dispatcher:1.0+'
24+
```
25+
26+
Read our [setup documentation](https://doc.batch.com/) to follow a step by step tutorial for integrating Batch features into your app.
27+
28+
# Documentation
29+
30+
- [Technical](https://batch.com/doc)
31+
- [FAQ](https://batch.com/doc/faq/general.html)
32+
- [Developer FAQ](https://batch.com/developers)
33+
34+
Copyright 2020 - Batch.com

build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77

88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.5.1'
10+
classpath 'com.android.tools.build:gradle:3.6.0'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
@@ -18,9 +18,7 @@ allprojects {
1818
repositories {
1919
google()
2020
jcenter()
21-
flatDir {
22-
dirs 'libs'
23-
}
21+
mavenLocal()
2422
}
2523
}
2624

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
apply plugin: 'com.android.library'
22

3+
ext {
4+
mavenGroupId = 'com.batch.android'
5+
mavenArtifact = 'google-analytics-dispatcher'
6+
androidXLibraryVersion = '1.0.0'
7+
}
8+
39
android {
410
compileSdkVersion 29
511
buildToolsVersion "29.0.2"
@@ -8,7 +14,7 @@ android {
814
minSdkVersion 15
915
targetSdkVersion 29
1016
versionCode 1
11-
versionName "1.0"
17+
versionName "1.0.0"
1218

1319
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1420
consumerProguardFiles 'consumer-rules.pro'
@@ -19,41 +25,35 @@ android {
1925
targetCompatibility JavaVersion.VERSION_1_8
2026
}
2127

22-
flavorDimensions "target-backend"
23-
24-
productFlavors {
25-
production {
26-
dimension "target-backend"
27-
}
28-
29-
staging {
30-
dimension "target-backend"
31-
}
32-
}
33-
3428
testOptions {
3529
unitTests {
3630
includeAndroidResources = true
31+
all {
32+
testLogging {
33+
events "started", "passed", "skipped", "failed"
34+
}
35+
}
3736
}
3837
}
39-
4038
}
4139

4240
dependencies {
43-
api(name:'Batch', ext:'aar')
44-
//api 'com.batch.android:batch-sdk:[1.15,)' TODO remove aar and use maven repo after 1.15 release
45-
api 'androidx.annotation:annotation:1.1.0'
41+
api 'com.batch.android:batch-sdk:1.15.0'
4642
api 'com.google.android.gms:play-services-analytics:17.0.0'
43+
implementation "androidx.annotation:annotation:$androidXLibraryVersion"
4744

4845
testImplementation 'junit:junit:4.12'
4946
testImplementation 'androidx.test.ext:junit:1.1.1'
50-
testImplementation 'org.mockito:mockito-core:2.25.1'
51-
testImplementation 'org.robolectric:robolectric:4.3'
47+
testImplementation 'org.mockito:mockito-core:3.2.4'
48+
testImplementation 'org.robolectric:robolectric:4.3.1'
5249
testImplementation 'androidx.test.espresso:espresso-core:3.2.0'
5350

5451
// We use PowerMock to mock GoogleAnalytics in tests
55-
testImplementation 'org.powermock:powermock-module-junit4:2.0.2'
56-
testImplementation 'org.powermock:powermock-module-junit4-rule:2.0.2'
57-
testImplementation 'org.powermock:powermock-api-mockito2:2.0.2'
58-
testImplementation 'org.powermock:powermock-classloading-xstream:2.0.2'
52+
testImplementation 'org.powermock:powermock-module-junit4:2.0.4'
53+
testImplementation 'org.powermock:powermock-module-junit4-rule:2.0.4'
54+
testImplementation 'org.powermock:powermock-api-mockito2:2.0.4'
55+
testImplementation 'org.powermock:powermock-classloading-xstream:2.0.4'
5956
}
57+
58+
apply from: 'maven-publish.gradle'
59+
apply from: 'jacoco.gradle'

0 commit comments

Comments
 (0)