Skip to content

Commit

Permalink
Merge pull request #3 from GoldenSoju/1.10
Browse files Browse the repository at this point in the history
1.10
  • Loading branch information
GoldenSoju authored Apr 21, 2024
2 parents 68d82ad + 0c49482 commit 80960eb
Show file tree
Hide file tree
Showing 24 changed files with 165 additions and 122 deletions.
8 changes: 8 additions & 0 deletions nat_l10n/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.1.0

- Updates dependencies.
- Updates minimum Flutter version to 3.3.
- Aligns Dart and Flutter SDK constraints.
- Add namespace attribute for Android
- General modernization

## 1.0.0

- Updates dependencies.
Expand Down
2 changes: 1 addition & 1 deletion nat_l10n/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2022 Cloudia9 Corp.
Copyright 2024 Cloudia9 Corp.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
19 changes: 12 additions & 7 deletions nat_l10n/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.cloudia9.nat_l10n'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.7.22'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:8.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -25,15 +25,20 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 33
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'com.cloudia9.nat_l10n'
}

compileSdk 34

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

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = 17
}

sourceSets {
Expand All @@ -46,5 +51,5 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
2 changes: 1 addition & 1 deletion nat_l10n/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.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
39 changes: 19 additions & 20 deletions nat_l10n/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
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()) {
Expand All @@ -6,11 +12,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,30 +22,32 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

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

android {
compileSdkVersion flutter.compileSdkVersion
compileSdk 34

namespace 'com.cloudia9.nat_l10n_example'

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

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = 17
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
applicationId "com.cloudia9.nat_l10n_example"
minSdkVersion 21/*flutter.minSdkVersion*/
targetSdkVersion flutter.targetSdkVersion
minSdk 21
targetSdk 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand All @@ -59,8 +62,4 @@ android {

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
}
17 changes: 2 additions & 15 deletions nat_l10n/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}

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

allprojects {
repositories {
google()
Expand All @@ -26,6 +13,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
30 changes: 22 additions & 8 deletions nat_l10n/example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
include ':app'
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
}()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

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"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.9.23" apply false
}

include ":app"
2 changes: 1 addition & 1 deletion nat_l10n/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
8 changes: 4 additions & 4 deletions nat_l10n/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/nat_l10n/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
nat_l10n: 81d1c6985340df90a04f1f9bbd97856c494594f0
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
nat_l10n: 0c16f8d9f33c1037f20ee4268ca1d8ff26dd6d9c

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048

COCOAPODS: 1.11.3
COCOAPODS: 1.15.2
1 change: 0 additions & 1 deletion nat_l10n/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
04104A802EE1ECF0137E285F /* Pods-Runner.release.xcconfig */,
68E72830097D3F1468C9514F /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down
4 changes: 2 additions & 2 deletions nat_l10n/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void main() {
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
const MyHomePage({super.key});

@override
State<MyHomePage> createState() => _MyHomePageState();
Expand Down
3 changes: 1 addition & 2 deletions nat_l10n/example/lib/widgets/currencies_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import '../widgets/detail_card.dart';
import 'drop_down_row.dart';

class CurrenciesView extends StatefulWidget {
const CurrenciesView(this.natL10n, this.updateHeader, {Key? key})
: super(key: key);
const CurrenciesView(this.natL10n, this.updateHeader, {super.key});

final NatL10n natL10n;
final void Function(String) updateHeader;
Expand Down
3 changes: 1 addition & 2 deletions nat_l10n/example/lib/widgets/detail_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import 'package:nat_l10n_example/src/constants.dart';

class DetailCard extends StatelessWidget {
const DetailCard(
{Key? key, required this.firstLine, required this.secondLine})
: super(key: key);
{super.key, required this.firstLine, required this.secondLine});

final String firstLine;
final String secondLine;
Expand Down
3 changes: 1 addition & 2 deletions nat_l10n/example/lib/widgets/locales_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import 'package:nat_l10n_example/widgets/detail_card.dart';
import 'package:nat_l10n_example/widgets/drop_down_row.dart';

class LocalesView extends StatefulWidget {
const LocalesView(this.natL10n, this.updateHeader, {Key? key})
: super(key: key);
const LocalesView(this.natL10n, this.updateHeader, {super.key});

final NatL10n natL10n;
final void Function(String) updateHeader;
Expand Down
3 changes: 1 addition & 2 deletions nat_l10n/example/lib/widgets/time_zones_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import '../widgets/detail_card.dart';
import 'drop_down_row.dart';

class TimeZonesView extends StatefulWidget {
const TimeZonesView(this.natL10n, this.updateHeader, {Key? key})
: super(key: key);
const TimeZonesView(this.natL10n, this.updateHeader, {super.key});

final NatL10n natL10n;
final void Function(String) updateHeader;
Expand Down
Loading

0 comments on commit 80960eb

Please sign in to comment.