Skip to content

Commit

Permalink
Merge pull request #225 from droibit/feature/kotlinize
Browse files Browse the repository at this point in the history
Kotlinize `flutter_custom_tabs_android` package plugin
  • Loading branch information
droibit authored Dec 24, 2024
2 parents 1d981f5 + 52dcc4a commit c951e57
Show file tree
Hide file tree
Showing 57 changed files with 2,975 additions and 3,577 deletions.
9 changes: 5 additions & 4 deletions flutter_custom_tabs/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id 'com.android.application'
id 'dev.flutter.flutter-gradle-plugin'
}

def localProperties = new Properties()
Expand All @@ -22,12 +22,12 @@ if (flutterVersionName == null) {
}

android {
namespace "com.github.droibit.flutter.plugins.customtabs.example"
namespace 'com.github.droibit.flutter.plugins.customtabs.example'
compileSdk 34 // flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

defaultConfig {
applicationId "com.github.droibit.flutter.plugins.customtabs.example"
applicationId 'com.github.droibit.flutter.plugins.customtabs.example'
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdk flutter.minSdkVersion
Expand All @@ -44,6 +44,7 @@ android {
signingConfig signingConfigs.debug
}
}

lint {
disable 'InvalidPackage'
}
Expand Down
8 changes: 7 additions & 1 deletion flutter_custom_tabs/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.1.4'
}
}

Expand All @@ -15,6 +15,12 @@ allprojects {
mavenCentral()
maven { url "https://jitpack.io" }
}

gradle.projectsEvaluated {
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}

rootProject.buildDir = '../build'
Expand Down
26 changes: 21 additions & 5 deletions flutter_custom_tabs_android/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
group 'com.github.droibit.plugins.flutter.customtabs'
version '1.0-SNAPSHOT'

buildscript {
repositories {
Expand All @@ -8,7 +7,8 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10'
}
}

Expand All @@ -21,9 +21,10 @@ rootProject.allprojects {
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
if (project.android.hasProperty("namespace")) {
if (project.android.hasProperty('namespace')) {
namespace 'com.github.droibit.plugins.flutter.customtabs'
}

Expand All @@ -47,15 +48,30 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

testOptions {
unitTests.all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
outputs.upToDateWhen { false }
showStandardStreams = true
}
}
}

dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.browser:browser:1.8.0'
implementation 'com.github.droibit:customtabslauncher:3.0.0-beta01'

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.11'
testImplementation 'org.mockito:mockito-core:5.12.0'
testImplementation 'io.mockk:mockk:1.13.3'
testImplementation 'com.google.truth:truth:1.4.4'
testImplementation 'androidx.test.ext:truth:1.6.0'
testImplementation 'androidx.test.ext:junit:1.2.1'
testImplementation 'androidx.test.ext:junit-ktx:1.2.1'
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit c951e57

Please sign in to comment.