Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .dart_tool/extension_discovery/README.md

This file was deleted.

1 change: 0 additions & 1 deletion .dart_tool/extension_discovery/vs_code.json

This file was deleted.

101 changes: 0 additions & 101 deletions .dart_tool/package_config_subset

This file was deleted.

1 change: 0 additions & 1 deletion .dart_tool/version

This file was deleted.

66 changes: 31 additions & 35 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,53 +1,49 @@
group 'com.ttlock.ttlock_flutter'
version '1.0'
plugins {
id 'com.android.library'
}

group = 'com.ttlock.ttlock_flutter'
version = '1.0'

android {
namespace 'com.ttlock.ttlock_flutter'
compileSdk = 35
ndkVersion "28.0.12674087"

buildscript {
ext {
agp_version = '4.1.2'
defaultConfig {
minSdk = 18
}
repositories {
mavenCentral()
google()
jcenter()

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

dependencies {
classpath "com.android.tools.build:gradle:$agp_version"
lint {
disable 'InvalidPackage'
}
}

rootProject.allprojects {
repositories {
mavenCentral()
google()
jcenter()
flatDir {
dirs 'libs'
packaging {
jniLibs {
useLegacyPackaging = false
}
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 31
namespace 'com.ttlock.ttlock_flutter'
defaultConfig {
minSdkVersion 18
}
lintOptions {
disable 'InvalidPackage'
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
repositories {
google()
mavenCentral()
jcenter()
flatDir {
dirs 'libs'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// implementation 'com.ttlock:ttlock:3.5.0'
// implementation(name: 'ttlock-release', ext: 'aar')
// implementation files('libs/ttlock-release.aar')
implementation files('libs/ttlock-classes.jar')
implementation 'com.google.code.gson:gson:2.6.2'
implementation(name: 'ttlock-release', ext: 'aar')
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
}
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Mon Dec 04 09:25:22 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
# distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file added android/libs/ttlock-classes.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'ttlock_flutter'
rootProject.name = 'ttlock_flutter'
Binary file added android/src/main/jniLibs/arm64-v8a/libLockCore.so
Binary file not shown.
Binary file not shown.
Binary file added android/src/main/jniLibs/x86/libLockCore.so
Binary file not shown.
Binary file added android/src/main/jniLibs/x86_64/libLockCore.so
Binary file not shown.
4 changes: 4 additions & 0 deletions android/src/main/res/values/values.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">sdk</string>
</resources>
24 changes: 24 additions & 0 deletions android/src/main/res/xml/file_paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<root-path
name="root"
path="" />
<files-path
name="files"
path="" />

<cache-path
name="cache"
path="" />

<external-path
name="external"
path="" />

<external-files-path
name="external_file_path"
path="" />
<external-cache-path
name="external_cache_path"
path="" />
</paths>
46 changes: 19 additions & 27 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugins {
id 'com.android.application'
id 'dev.flutter.flutter-gradle-plugin'
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +11,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,47 +21,39 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 34

lintOptions {
disable 'InvalidPackage'
}
namespace 'com.ttlock.ttlock_flutter_example'
compileSdkVersion 35
ndkVersion "28.0.12674087"

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.ttlock.ttlock_flutter_example"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
targetSdkVersion 35
versionCode 1
versionName "1.0"
}

compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
shrinkResources false
minifyEnabled false
}
}
namespace 'com.ttlock.ttlock_flutter_example'

lintOptions {
disable 'InvalidPackage'
}
}

repositories {
flatDir {
dirs 'libs', '..\\..\\..\\android\\libs'
dirs 'libs', '../../../android/libs'
}
}

flutter {
source '../..'
}
}
26 changes: 5 additions & 21 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
buildscript {
ext {

agp_version = '8.6.0'
}
repositories {
mavenCentral()
google()
jcenter()
}

dependencies {
classpath "com.android.tools.build:gradle:$agp_version"
}
}

allprojects {
repositories {
mavenCentral()
google()
jcenter()
mavenCentral()
}
}

rootProject.buildDir = '../build'
rootProject.buildDir = "../build"

subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}

subprojects {
project.evaluationDependsOn(':app')
project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
Loading