Skip to content

Commit

Permalink
Update android example version
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonarafat committed Oct 26, 2024
1 parent 77ee239 commit c6f0c6e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 51 deletions.
25 changes: 13 additions & 12 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

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 @@ -20,12 +21,12 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

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

android {
compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -38,7 +39,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.super_tooltip_example"
minSdkVersion flutter.minSdkVersion
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand All @@ -58,5 +59,5 @@ flutter {
}

dependencies {
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
14 changes: 13 additions & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
Expand All @@ -16,4 +28,4 @@ subprojects {

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
4 changes: 2 additions & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
39 changes: 7 additions & 32 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,36 +1,11 @@


pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}
include ':app'

// def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
// def properties = new Properties()
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()

// assert localPropertiesFile.exists()
// localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }

// def flutterSdkPath = properties.getProperty("flutter.sdk")
// assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
// apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
6 changes: 2 additions & 4 deletions lib/src/super_tooltip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,8 @@ class SuperTooltip extends StatefulWidget {
/// A custom decoration for the tooltip.
///
/// If not provided, the default decoration will be used.
final Decoration? decoration;

final DecorationBuilder? decorationBuilder;

/// The elevation of the tooltip.
///
/// Defaults to `0.0`.
Expand Down Expand Up @@ -228,7 +226,7 @@ class SuperTooltip extends StatefulWidget {
///
/// Defaults to `2.0`.
final double arrowTipRadius;

final double arrowTipDistance;

/// The border radius of the tooltip.
Expand Down

0 comments on commit c6f0c6e

Please sign in to comment.