Skip to content

Commit ef001b4

Browse files
author
weiqiangliu
committed
Release 4.0.0-beta
1 parent 8f44686 commit ef001b4

File tree

260 files changed

+16049
-4566
lines changed

Some content is hidden

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

260 files changed

+16049
-4566
lines changed

build.gradle

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,15 @@
1-
apply from: 'ext.gradle'
2-
3-
buildscript {
4-
repositories {
5-
google()
6-
mavenLocal()
7-
mavenCentral()
8-
jcenter()
9-
}
10-
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.4.1'
12-
13-
// NOTE: Do not place your application dependencies here; they belong
14-
// in the individual module build.gradle files
15-
}
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
plugins {
3+
id 'com.android.application' version '7.3.1' apply false //demo used
4+
id 'com.android.library' version '7.3.1' apply false //demo used
5+
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
6+
id 'org.jetbrains.kotlin.jvm' version '1.7.20' apply false
7+
id 'com.gradle.plugin-publish' version '1.1.0' apply false
8+
// id 'com.sensorsdata.analytics.android' version '4.0.0-beta' apply false
169
}
1710

18-
allprojects {
19-
buildscript {
20-
repositories {
21-
mavenLocal()
22-
mavenCentral()
23-
jcenter()
24-
}
25-
}
2611

27-
dependencies {
28-
repositories {
29-
google()
30-
mavenLocal()
31-
mavenCentral()
32-
jcenter()
33-
}
34-
}
35-
36-
apply plugin: 'maven'
37-
}
12+
ext {
13+
agpVersion = '7.3.1' //used for compile
14+
pluginVersion = '4.0.0-beta' //plugin version
15+
}

demo/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

demo/build.gradle

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
plugins {
2+
id 'com.android.application'
3+
id 'org.jetbrains.kotlin.android'
4+
// id 'com.sensorsdata.analytics.android'
5+
}
6+
7+
android {
8+
namespace 'com.sensorsdata.analytics.android.demo'
9+
compileSdk 32
10+
11+
defaultConfig {
12+
applicationId "com.sensorsdata.analytics.android.demo"
13+
minSdk 28
14+
targetSdk 32
15+
versionCode 1
16+
versionName "1.0"
17+
18+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
19+
}
20+
21+
buildTypes {
22+
release {
23+
minifyEnabled false
24+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
25+
}
26+
}
27+
compileOptions {
28+
sourceCompatibility JavaVersion.VERSION_1_8
29+
targetCompatibility JavaVersion.VERSION_1_8
30+
}
31+
kotlinOptions {
32+
jvmTarget = '1.8'
33+
}
34+
}
35+
36+
dependencies {
37+
38+
implementation 'androidx.core:core-ktx:1.7.0'
39+
implementation 'androidx.appcompat:appcompat:1.4.1'
40+
implementation 'com.google.android.material:material:1.5.0'
41+
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
42+
testImplementation 'junit:junit:4.13.2'
43+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
44+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
45+
implementation('com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.6.0')
46+
}
47+
48+
//sensorsAnalytics {
49+
// debug = true
50+
// disableModules = ['PUSH']
51+
// // exclude=['com.sensorsdata.analytics.android.demo']
52+
//// disableTrackPush = true
53+
//// sdk{
54+
//// disableAndroidID = true
55+
//// disableIMEI=true
56+
//// disableMacAddress=true
57+
//// disableCarrier=true
58+
//// disableOAID=false
59+
//// }
60+
//// addUCJavaScriptInterface=true
61+
//}

demo/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.sensorsdata.analytics.android.demo
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.sensorsdata.analytics.android.plugin", appContext.packageName)
23+
}
24+
}

demo/src/main/AndroidManifest.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:dataExtractionRules="@xml/data_extraction_rules"
8+
android:fullBackupContent="@xml/backup_rules"
9+
android:icon="@mipmap/ic_launcher"
10+
android:usesCleartextTraffic="true"
11+
android:name=".App"
12+
android:label="@string/app_name"
13+
android:roundIcon="@mipmap/ic_launcher_round"
14+
android:supportsRtl="true"
15+
android:theme="@style/Theme.Sasdkandroidplugin2"
16+
tools:targetApi="31">
17+
<activity
18+
android:name=".MainActivity"
19+
android:exported="true">
20+
<intent-filter>
21+
<action android:name="android.intent.action.MAIN" />
22+
23+
<category android:name="android.intent.category.LAUNCHER" />
24+
</intent-filter>
25+
26+
<meta-data
27+
android:name="android.app.lib_name"
28+
android:value="" />
29+
</activity>
30+
31+
<activity android:name=".H5Activity"/>
32+
</application>
33+
34+
</manifest>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# App_H5_traffic_sdk

0 commit comments

Comments
 (0)