Skip to content

Commit

Permalink
Release 4.0.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqiangliu committed Jun 1, 2023
1 parent 8f44686 commit ef001b4
Show file tree
Hide file tree
Showing 260 changed files with 16,049 additions and 4,566 deletions.
46 changes: 12 additions & 34 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,15 @@
apply from: 'ext.gradle'

buildscript {
repositories {
google()
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.1' apply false //demo used
id 'com.android.library' version '7.3.1' apply false //demo used
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
id 'org.jetbrains.kotlin.jvm' version '1.7.20' apply false
id 'com.gradle.plugin-publish' version '1.1.0' apply false
// id 'com.sensorsdata.analytics.android' version '4.0.0-beta' apply false
}

allprojects {
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
}

dependencies {
repositories {
google()
mavenLocal()
mavenCentral()
jcenter()
}
}

apply plugin: 'maven'
}
ext {
agpVersion = '7.3.1' //used for compile
pluginVersion = '4.0.0-beta' //plugin version
}
1 change: 1 addition & 0 deletions demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
61 changes: 61 additions & 0 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
// id 'com.sensorsdata.analytics.android'
}

android {
namespace 'com.sensorsdata.analytics.android.demo'
compileSdk 32

defaultConfig {
applicationId "com.sensorsdata.analytics.android.demo"
minSdk 28
targetSdk 32
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation('com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.6.0')
}

//sensorsAnalytics {
// debug = true
// disableModules = ['PUSH']
// // exclude=['com.sensorsdata.analytics.android.demo']
//// disableTrackPush = true
//// sdk{
//// disableAndroidID = true
//// disableIMEI=true
//// disableMacAddress=true
//// disableCarrier=true
//// disableOAID=false
//// }
//// addUCJavaScriptInterface=true
//}
21 changes: 21 additions & 0 deletions demo/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.sensorsdata.analytics.android.demo

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.sensorsdata.analytics.android.plugin", appContext.packageName)
}
}
34 changes: 34 additions & 0 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:name=".App"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Sasdkandroidplugin2"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>

<activity android:name=".H5Activity"/>
</application>

</manifest>
1 change: 1 addition & 0 deletions demo/src/main/assets/new_h5_test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# App_H5_traffic_sdk
Loading

0 comments on commit ef001b4

Please sign in to comment.