title: How to update latest gradle version of kotlin library
body: <p>I created a library in multiplatform in  latest intellij. My intellj added the outdated gradle version
  <strong>settings.gradle.kts</strong></p>
  <pre><code>pluginManagement {
      repositories {
          google()
          gradlePluginPortal()
          mavenCentral()
      }
      resolutionStrategy {
          eachPlugin {
              if (requested.id.namespace == &quot;com.android&quot;) {
                  useModule(&quot;com.android.tools.build:gradle:4.1.2&quot;). // How to update to latest version and what is the use of 4.1.2?
              }
          }
      }
  }
  rootProject.name = &quot;xyz&quot;
  </code></pre>
  <p>I commented above in my code. Can someone guide <strong>how can I update my gradle version to latest and what is the use of 4.1.2</strong> that piece of code?</p>
  <p>I tried to remove 4.1.2 below piece of code then I am getting issue</p>
  <pre><code> resolutionStrategy {
       eachPlugin {
           if (requested.id.namespace == &quot;com.android&quot;) {
               useModule(&quot;com.android.tools.build:gradle:4.1.2&quot;)
           }
       }
   }
  </code></pre>
  <p><strong>Error</strong></p>
  <pre><code> Build file '/Users/vmodi/IdeaProjects/abc/build.gradle.kts' line: 1
   
   Plugin [id: 'com.android.application'] was not found in any of the following sources:
  </code></pre>
  <p><strong>gradle-wrapper.properties</strong></p>
  <pre><code> distributionBase=GRADLE_USER_HOME
   distributionPath=wrapper/dists
   distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
   zipStoreBase=GRADLE_USER_HOME
   zipStorePath=wrapper/dists
  </code></pre>
  <p><strong>build.gradle.kts</strong></p>
  <pre><code>plugins {
      kotlin(&quot;multiplatform&quot;) version &quot;1.6.21&quot;
      id(&quot;com.android.application&quot;)
  }
  
  group = &quot;com.abc&quot;
  version = &quot;0.0.1&quot;
  
  repositories {
      google()
      mavenCentral()
  }
  
  kotlin {
      android()
      iosX64()
      iosArm64()
      iosSimulatorArm64()
  
      sourceSets {
          val ktorVersion = &quot;2.0.0&quot;
          val commonMain by getting {
              dependencies {
                  implementation(&quot;io.ktor:ktor-client-core:$ktorVersion&quot;)
                  implementation(&quot;io.ktor:ktor-client-logging:$ktorVersion&quot;)
                  implementation(&quot;io.ktor:ktor-client-content-negotiation:$ktorVersion&quot;)
                  implementation(&quot;io.ktor:ktor-serialization-kotlinx-json:$ktorVersion&quot;)
                  implementation(&quot;io.ktor:ktor-client-auth:$ktorVersion&quot;)
                  implementation(&quot;org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.2&quot;)
                  implementation(&quot;io.insert-koin:koin-core:3.2.0-beta-1&quot;)
              }
          }
          val androidMain by getting {
              dependencies {
                  implementation(&quot;io.ktor:ktor-client-okhttp:$ktorVersion&quot;)
                  implementation(&quot;io.ktor:ktor-client-logging-jvm:$ktorVersion&quot;)
              }
              val iosX64Main by getting
              val iosArm64Main by getting
              val iosSimulatorArm64Main by getting
              val iosMain by creating {
                  dependsOn(commonMain)
                  iosX64Main.dependsOn(this)
                  iosArm64Main.dependsOn(this)
                  iosSimulatorArm64Main.dependsOn(this)
                  dependencies {
                      implementation(&quot;io.ktor:ktor-client-darwin:$ktorVersion&quot;)
                  }
              }
          }
      }
  }
  
  android {
      compileSdk = 21
      sourceSets[&quot;main&quot;].manifest.srcFile(&quot;src/androidMain/AndroidManifest.xml&quot;)
      defaultConfig {
          applicationId = &quot;com.abc.kotlinmultiplatform&quot;
          minSdk = 21
          targetSdk = 31
      }
      @Suppress(&quot;UnstableApiUsage&quot;)
      compileOptions {
          sourceCompatibility = JavaVersion.VERSION_1_8
          targetCompatibility = JavaVersion.VERSION_1_8
      }
  }
  </code></pre>
  <p><strong>IntelliJ version</strong></p>
  <pre><code>IntelliJ IDEA 2022.1.1 (Ultimate Edition)
  Build #IU-221.5591.52, built on May 10, 2022
  Licensed to Vivek Modi
  For educational use only.
  Runtime version: 11.0.14.1+1-b2043.45 x86_64
  VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  macOS 11.6.5
  GC: G1 Young Generation, G1 Old Generation
  Memory: 2048M
  Cores: 16
  Non-Bundled Plugins:
      com.intellij.nativeDebug (221.5591.54)
      org.jetbrains.kotlin-js-inspection-pack-plugin (0.0.9)
  
  Kotlin: 221-1.6.21-release-337-IJ5591.52
  </code></pre>
  <p>After @PylypDukhov suggestion, trying to update <strong>gradle</strong> <code>7.0.4</code> I am getting this weird error</p>
  <p><strong>error</strong></p>
  <pre><code>Failed to query the value of property 'namespace'.
  Package Name not found in /Users/vmodi/IdeaProjects/abc/src/androidMain/AndroidManifest.xml, and namespace not specified. Please specify a namespace for the generated R and BuildConfig classes via android.namespace in the module's build.gradle file like so:
  
  android {
      namespace 'com.example.namespace'
  }
  </code></pre>
  <p><strong>settings.gradle.kts</strong></p>
  <pre><code>pluginManagement {
      repositories {
          google()
          gradlePluginPortal()
          mavenCentral()
      }
      resolutionStrategy {
          eachPlugin {
              if (requested.id.namespace == &quot;com.android&quot;) {
                  useModule(&quot;com.android.tools.build:gradle:7.0.4&quot;)
              }
          }
      }
  }
  rootProject.name = &quot;LetsGetCheckedKotlinMultiplatform&quot;
  </code></pre>
  <p>Added <strong>androidMain</strong></p>
  <p><strong>AndroidManifest.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest package=&quot;com.abc&quot;/&gt;
  </code></pre>