Skip to content

Commit

Permalink
fix: starknet counter example (#440)
Browse files Browse the repository at this point in the history
* fix: build starknet_counter example with java 21

* docs: fix pubspec.yaml for starknet_counter example
  • Loading branch information
ptisserand authored Jan 17, 2025
1 parent f867c91 commit 37d0192
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 32 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-android-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ jobs:
- uses: bluefireteam/melos-action@v3
- name: Build wallet_app example
run: flutter build appbundle
working-directory: ./examples/wallet_app
working-directory: ./examples/wallet_app
- name: Build starknet_counter example
run: flutter build appbundle
working-directory: ./examples/starknet_counter
1 change: 0 additions & 1 deletion docs/examples/starknet-counter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ dependencies:
sdk: flutter
cupertino_icons: ^1.0.2
starknet:
starknet_flutter:
flutter_lints: ^2.0.0
build_runner: ^2.4.6
starknet_provider:
Expand Down
2 changes: 0 additions & 2 deletions examples/starknet_counter/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,3 @@ android {
flutter {
source '../..'
}

dependencies {}
13 changes: 0 additions & 13 deletions examples/starknet_counter/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.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,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.3-all.zip
19 changes: 12 additions & 7 deletions examples/starknet_counter/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ pluginManagement {
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
}()

includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

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

apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
include ":app"
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
import FlutterMacOS
import Foundation

import mobile_scanner
import path_provider_foundation
import starknet_flutter

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
MobileScannerPlugin.register(with: registry.registrar(forPlugin: "MobileScannerPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
StarknetFlutterPlugin.register(with: registry.registrar(forPlugin: "StarknetFlutterPlugin"))
}
1 change: 0 additions & 1 deletion examples/starknet_counter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ dependencies:
sdk: flutter
cupertino_icons: ^1.0.2
starknet:
starknet_flutter:
flutter_lints: ^2.0.0
build_runner: ^2.4.6
starknet_provider:
Expand Down

0 comments on commit 37d0192

Please sign in to comment.