Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit980a1bb

Browse files
authored
Merge pull request#47 from aminekarimii/addon/appsflyer
Add AppsFlyer addon integration
2 parents5269df4 +c858dbb commit980a1bb

File tree

25 files changed

+1039
-54
lines changed

25 files changed

+1039
-54
lines changed

‎PUBLISHING_GUIDE.md‎

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
#Publishing Guide
2+
3+
This guide explains how to publish individual modules or all modules to Maven Central.
4+
5+
##Prerequisites
6+
7+
1.**Signing Key**: Ensure you have a valid PGP signing key configured in`local.properties`:
8+
```properties
9+
signing.keyId=YOUR_KEY_ID
10+
signing.password=YOUR_KEY_PASSPHRASE
11+
signing.key=signing.key.txt
12+
```
13+
14+
2.**Maven Central Credentials**: Configure your credentials in`local.properties`:
15+
```properties
16+
centralPortalUsername=YOUR_USERNAME
17+
centralPortalPassword=YOUR_PASSWORD
18+
```
19+
20+
##Publishing Individual Modules
21+
22+
###Method 1: Using the Batch Script (Windows)
23+
24+
The easiest way to publish a single module:
25+
26+
```bash
27+
# Publish a specific module
28+
publish.bat analytiks-appsflyer
29+
30+
# List all available modules
31+
publish.bat list
32+
33+
# Publish all addon modules
34+
publish.bat all-addons
35+
36+
# Publish core modules
37+
publish.bat core
38+
```
39+
40+
###Method 2: Using Gradle Directly
41+
42+
```bash
43+
# Publish a specific module
44+
./gradlew publishModule -PmoduleName=analytiks-appsflyer
45+
46+
# List all available modules
47+
./gradlew listModules
48+
49+
# Publish all addon modules
50+
./gradlew publishAllAddons
51+
52+
# Publish core modules
53+
./gradlew publishCore
54+
```
55+
56+
##Available Modules
57+
58+
###Core Modules
59+
-`analytiks-core` - Core analytics functionality
60+
-`analytiks` - Main analytics library
61+
62+
###Addon Modules
63+
-`analytiks-appsflyer` - AppsFlyer integration
64+
-`analytiks-amplitude` - Amplitude integration
65+
-`analytiks-appvisor` - AppVisor integration
66+
-`analytiks-azureinsight` - Azure Application Insights integration
67+
-`analytiks-googleanalytics` - Google Analytics integration
68+
-`analytiks-mixpanel` - Mixpanel integration
69+
-`analytiks-segment` - Segment integration
70+
-`analytiks-timber` - Timber logging integration
71+
72+
##Publishing Workflow
73+
74+
###Publishing a Single Module
75+
76+
1.**Build and test the module**:
77+
```bash
78+
./gradlew :addon:analytiks-appsflyer:build
79+
./gradlew :addon:analytiks-appsflyer:test
80+
```
81+
82+
2.**Publish the module**:
83+
```bash
84+
publish.bat analytiks-appsflyer
85+
```
86+
87+
Or using Gradle:
88+
```bash
89+
./gradlew publishModule -PmoduleName=analytiks-appsflyer
90+
```
91+
92+
3.**Verify on Maven Central**:
93+
- Go tohttps://central.sonatype.com/
94+
- Search for`io.github.aminekarimii:analytiks-appsflyer`
95+
- Check that version 1.1.0 is available
96+
97+
###Publishing All Addon Modules
98+
99+
If you want to publish all addon modules at once:
100+
101+
```bash
102+
publish.bat all-addons
103+
```
104+
105+
Or:
106+
107+
```bash
108+
./gradlew publishAllAddons
109+
```
110+
111+
###Publishing Core Modules
112+
113+
To publish the core modules (analytiks-core and analytiks):
114+
115+
```bash
116+
publish.bat core
117+
```
118+
119+
Or:
120+
121+
```bash
122+
./gradlew publishCore
123+
```
124+
125+
##Troubleshooting
126+
127+
###Issue: "Module not found"
128+
129+
Make sure you're using the correct module name. Run`publish.bat list` to see all available modules.
130+
131+
###Issue: "Signing failed"
132+
133+
Check that:
134+
1. Your`signing.password` in`local.properties` is the correct PGP key passphrase (not the key ID or fingerprint)
135+
2. The`signing.key.txt` file exists and contains your PGP private key
136+
3. The`signing.keyId` matches your key (last 8 characters of the fingerprint)
137+
138+
###Issue: "Authentication failed"
139+
140+
Verify your Maven Central credentials in`local.properties`:
141+
-`centralPortalUsername` should be your Central Portal username
142+
-`centralPortalPassword` should be your Central Portal password (or token)
143+
144+
###Issue: "Duplicate artifacts"
145+
146+
This usually happens when publishing multiple modules simultaneously. Use the single module publishing approach instead:
147+
148+
```bash
149+
# Instead of:
150+
./gradlew build publishToSonatype closeAndReleaseStagingRepositories
151+
152+
# Do:
153+
publish.bat analytiks-appsflyer
154+
publish.bat analytiks-amplitude
155+
# etc.
156+
```
157+
158+
###Issue: "Validation failed"
159+
160+
Some modules may have validation errors. To see which modules are failing:
161+
162+
1. Check the Maven Central validation report
163+
2. Fix the issues in the failing modules
164+
3. Publish only the modules that pass validation
165+
166+
##Publishing Strategy
167+
168+
###Recommended Approach
169+
170+
1.**Publish core modules first**:
171+
```bash
172+
publish.bat core
173+
```
174+
175+
2.**Publish addon modules one by one**:
176+
```bash
177+
publish.bat analytiks-appsflyer
178+
publish.bat analytiks-amplitude
179+
# etc.
180+
```
181+
182+
3.**Or publish only the modules you need**:
183+
```bash
184+
publish.bat analytiks-appsflyer
185+
```
186+
187+
###Why Publish Individually?
188+
189+
-**Avoid validation errors**: Some modules may have issues that prevent publishing
190+
-**Faster feedback**: You know immediately if a specific module fails
191+
-**Easier debugging**: Errors are isolated to a single module
192+
-**Selective publishing**: Only publish the modules you've updated
193+
194+
##Version Management
195+
196+
The version is defined in`gradle.properties`:
197+
198+
```properties
199+
PUBLISH_VERSION=1.1.0
200+
```
201+
202+
To publish a new version:
203+
204+
1. Update`PUBLISH_VERSION` in`gradle.properties`
205+
2. Commit the change
206+
3. Publish the modules
207+
4. Tag the release in Git:
208+
```bash
209+
git tag -a v1.1.0 -m"Release version 1.1.0"
210+
git push origin v1.1.0
211+
```
212+
213+
##CI/CD Integration
214+
215+
You can integrate the publishing scripts into your CI/CD pipeline:
216+
217+
```yaml
218+
# Example GitHub Actions workflow
219+
-name:Publish AppsFlyer module
220+
run:./gradlew publishModule -PmoduleName=analytiks-appsflyer
221+
env:
222+
SIGNING_KEY_ID:${{ secrets.SIGNING_KEY_ID }}
223+
SIGNING_PASSWORD:${{ secrets.SIGNING_PASSWORD }}
224+
SIGNING_KEY:${{ secrets.SIGNING_KEY }}
225+
CENTRAL_PORTAL_USERNAME:${{ secrets.CENTRAL_PORTAL_USERNAME }}
226+
CENTRAL_PORTAL_PASSWORD:${{ secrets.CENTRAL_PORTAL_PASSWORD }}
227+
```
228+
229+
## Quick Reference
230+
231+
| Command | Description |
232+
|---------|-------------|
233+
|`publish.bat <module>` | Publish a specific module |
234+
| `publish.bat list` | List all available modules |
235+
| `publish.bat all-addons` | Publish all addon modules |
236+
| `publish.bat core` | Publish core modules |
237+
| `./gradlew listModules` | List all available modules |
238+
| `./gradlew publishModule -PmoduleName=<module>` | Publish a specific module |
239+
| `./gradlew publishAllAddons` | Publish all addon modules |
240+
| `./gradlew publishCore` | Publish core modules |
241+
242+
## Support
243+
244+
If you encounter issues:
245+
246+
1. Check this guide for troubleshooting steps
247+
2. Review the Gradle output for error messages
248+
3. Check the Maven Central validation report
249+
4. Ensure all prerequisites are correctly configured
250+

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ analytiks.reset()
225225
|**Amplitude**| ✅ Available|[Setup Guide](./addon/analytiks-amplitude/README.md)|[Amplitude Docs](https://www.docs.developers.amplitude.com/data/sdks/sdk-quickstart/)|
226226
|**Timber (Local Logging)**| ✅ Available| Built-in|[Timber GitHub](https://github.com/JakeWharton/timber)|
227227
|**Custom Analytics**| ✅ Available|[Create Custom Addon](./analytiks-core)| -|
228+
|**AppsFlyer**|| <ahref="./addon/analytiks-appsflyer/README.md">AppsFlyer Addon doc</a>| <ahref="https://dev.appsflyer.com/hc/docs/android-sdk">AppsFlyer doc</a>|
228229
|**Flurry Analytics**| 🚧 Coming Soon| -| -|
229230
|**CleverTap**| 🚧 Coming Soon| -| -|
230231
|**MoEngage**| 🚧 Coming Soon| -| -|
@@ -280,7 +281,6 @@ class MyApplication : Application() {
280281

281282
##🔨 Advanced Usage
282283

283-
###Creating Custom Analytics Providers
284284

285285
You can create custom analytics providers by implementing the`AnalyticsClient` interface:
286286

‎addon/analytiks-amplitude/build.gradle‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ android {
2727
}
2828
}
2929
compileOptions {
30-
sourceCompatibilityJavaVersion.VERSION_1_8
31-
targetCompatibilityJavaVersion.VERSION_1_8
30+
sourceCompatibilityJavaVersion.VERSION_17
31+
targetCompatibilityJavaVersion.VERSION_17
3232
}
3333
kotlinOptions {
34-
jvmTarget='1.8'
34+
jvmTarget='17'
3535
}
3636
}
3737

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#Analytiks AppsFlyer Addon
2+
3+
This addon integrates AppsFlyer SDK with the Analytiks analytics framework.
4+
5+
##Features
6+
7+
- Event tracking
8+
- User identification
9+
- User properties
10+
- Automatic data transmission
11+
12+
##Setup
13+
14+
###1. Add dependency
15+
16+
Add the AppsFlyer addon to your app's`build.gradle`:
17+
18+
```gradle
19+
dependencies {
20+
implementation project(':addon:analytiks-appsflyer')
21+
}
22+
```
23+
24+
###2. Initialize
25+
26+
```kotlin
27+
val appsFlyerClient=AppsFlyerClient(
28+
devKey="YOUR_APPSFLYER_DEV_KEY",
29+
enableDebugLog=BuildConfig.DEBUG
30+
)
31+
32+
// Add to your analytics setup
33+
analytiks.addClient(appsFlyerClient)
34+
```
35+
36+
##Configuration
37+
38+
###Constructor Parameters
39+
40+
-`devKey`: Your AppsFlyer developer key (required)
41+
-`enableDebugLog`: Enable debug logging (default: false)
42+
43+
##AppsFlyer SDK Version
44+
45+
This addon uses AppsFlyer Android SDK version**6.17.0**.
46+
47+
##Permissions
48+
49+
The following permissions are automatically added:
50+
51+
-`android.permission.INTERNET`
52+
-`android.permission.ACCESS_NETWORK_STATE`
53+
54+
##Usage
55+
56+
Once configured, the AppsFlyer client will automatically:
57+
58+
- Track events logged through the Analytiks framework
59+
- Identify users when`identify()` is called
60+
- Set user properties when`setUserProperty()` is called
61+
- Handle data transmission automatically
62+
63+
##Documentation
64+
65+
For more information about AppsFlyer SDK features, visit:
66+
-[AppsFlyer Android SDK Documentation](https://dev.appsflyer.com/hc/docs/android-sdk)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
plugins {
2+
id'com.android.library'
3+
id'org.jetbrains.kotlin.android'
4+
}
5+
6+
ext {
7+
PUBLISH_ARTIFACT_ID='analytiks-appsflyer'
8+
}
9+
applyfrom:"${rootProject.projectDir}/scripts/publish-module.gradle"
10+
11+
android {
12+
namespace'com.analytiks.addon.appsflyer'
13+
compileSdk rootProject.compileSdk
14+
15+
defaultConfig {
16+
minSdk21
17+
targetSdk rootProject.targetSdk
18+
19+
testInstrumentationRunner"androidx.test.runner.AndroidJUnitRunner"
20+
}
21+
22+
buildTypes {
23+
release {
24+
minifyEnabledfalse
25+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
26+
}
27+
}
28+
compileOptions {
29+
sourceCompatibilityJavaVersion.VERSION_17
30+
targetCompatibilityJavaVersion.VERSION_17
31+
}
32+
kotlinOptions {
33+
jvmTarget='17'
34+
}
35+
}
36+
37+
dependencies {
38+
implementation project(':analytiks-core')
39+
implementation'com.appsflyer:af-android-sdk:6.17.0'
40+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp