• 15-01-2024, 20:10:08
    #1
    Merhaba Flutter üzerinden grandle sürümleri seçiminde sorun yaşıyorum.

    Örnek
    id "com.android.application" version "7.3.0" apply false
    id "org.jetbrains.kotlin.android" version "1.7.10" apply false
    distributionUrl = https://services.gradle.org/distribu...le-8.5-all.zip


    En son güncel uyunlu çalışan kodlar nasıl olmalı


    Mevcut dosyalarım aşağıdaki gibidir,

    Android/settings.gradle

    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
    }
    settings.ext.flutterSdkPath = flutterSdkPath()
    
    includeBuild("${settings.ext.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"
    android/build.grandle

    allprojects {
     repositories {
     google()
     mavenCentral()
     }
    }
    
    rootProject.buildDir = '../build'
    subprojects {
     project.buildDir = "${rootProject.buildDir}/${project.name}"
    }
    subprojects {
     project.evaluationDependsOn(':app')
    }
    
    tasks.register("clean", Delete) {
     delete rootProject.buildDir
    }


    grandle/wrapper/gradle-wrapper.properties
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl = https\://services.gradle.org/distributions/gradle-8.5-all.zip


    android/app/build.grandle

    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 flutterVersionCode = localProperties.getProperty('flutter.versionCode')
    if (flutterVersionCode == null) {
    flutterVersionCode = '1'
    }
    
    def flutterVersionName = localProperties.getProperty('flutter.versionName')
    if (flutterVersionName == null) {
    flutterVersionName = '1.0'
    }
    
    android {
    namespace "com.paket.adi"
    compileSdk 34
    ndkVersion '25.1.8937393'
    
    compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
    }
    
    kotlinOptions {
    jvmTarget = '1.8'
    }
    signingConfigs {
    debug {
    storeFile file('/AndroidStudioProjects/key.jks')
    storePassword şifre'
    keyAlias 'tekcarem'
    keyPassword 'şifre'
    }
    release
    {
    storeFile file('/AndroidStudioProjects/key.jks')
    storePassword şifre'
    keyAlias 'tekcarem'
    keyPassword 'şifre
    }
    }
    sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
    }
    
    defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "tekcarem.gebeliktakibi"
    // 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.
    minSdkVersion 21
    targetSdkVersion 30
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    }
    
    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
    }
    }
    }
    
    flutter {
    source '../..'
    }
    
    dependencies {}
    //distributionUrl = https\://services.gradle.org/distributions/gradle-8.2-bin.zip eski çalışan kod
    [✓] Flutter (Channel master, 3.19.0-5.0.pre.46, on macOS 14.2.1 23C71 darwin-arm64, locale tr-TR)
    • Flutter version 3.19.0-5.0.pre.46 on channel master at /Users/omer/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b45cd23173 (74 minutes ago), 2024-01-15 10:53:24 -0500
    • Engine revision f20657354d
    • Dart version 3.4.0 (build 3.4.0-24.0.dev)
    • DevTools version 2.31.0

    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/omer/Library/Android/sdk
    • Platform android-34-ext8, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.
  • 15-01-2024, 20:12:32
    #2
    hocam hata alıyorsanız imzamda yer alan whatsapptan ulaşın inceleyim. grandle ile ilgiisi olmayabilir
  • 15-01-2024, 20:24:20
    #3
    android/build.gradle

    buildscript {
        ext.kotlin_version = '1.7.10'
        repositories {
            google()
            mavenCentral()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:7.1.2'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        }
    }
    allprojects {
        repositories {
            google()
            mavenCentral()
        }
    }
    rootProject.buildDir = '../build'
    subprojects {
        project.buildDir = "${rootProject.buildDir}/${project.name}"
    }
    subprojects {
        project.evaluationDependsOn(':app')
    }
    tasks.register("clean", Delete) {
        delete rootProject.buildDir
    }
    android/settings.gradle

    include ':app'
    def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
    def properties = new Properties()
    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"
    gradle/wrapper/gradle-wrapper.properties

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip