Migrate to new plugins and dependency management system
* Ensure every plugin is present in project's plugin block with version * Switch to full plugin id for jetbrains plugins * Move plugin and dependency repos to settings Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
parent
b7c1459aca
commit
1943595f11
6 changed files with 38 additions and 30 deletions
|
@ -1,7 +1,7 @@
|
||||||
plugins {
|
plugins {
|
||||||
id "com.android.application"
|
id 'com.android.application'
|
||||||
id "kotlin-android"
|
id 'org.jetbrains.kotlin.android'
|
||||||
id "org.jlleitschuh.gradle.ktlint" version "10.2.0"
|
id 'org.jlleitschuh.gradle.ktlint'
|
||||||
}
|
}
|
||||||
|
|
||||||
def gitDescribe = { ->
|
def gitDescribe = { ->
|
||||||
|
|
27
build.gradle
27
build.gradle
|
@ -7,17 +7,16 @@ buildscript {
|
||||||
// https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-13.0.0_r32/build.txt
|
// https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-13.0.0_r32/build.txt
|
||||||
ext.aosp_kotlin_version = '1.7.20' // 1.7.20-release-201 in AOSP
|
ext.aosp_kotlin_version = '1.7.20' // 1.7.20-release-201 in AOSP
|
||||||
ext.kotlin_version = '1.7.20'
|
ext.kotlin_version = '1.7.20'
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
plugins {
|
||||||
mavenCentral()
|
id 'com.android.application' version '7.4.2' apply false
|
||||||
google()
|
id 'com.android.library' version '7.4.2' apply false
|
||||||
}
|
id 'com.google.protobuf' version '0.8.17' apply false
|
||||||
dependencies {
|
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
|
||||||
//noinspection DifferentKotlinGradleVersion
|
id 'org.jetbrains.kotlin.kapt' version "$kotlin_version" apply false
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
id 'org.jetbrains.dokka' version "$kotlin_version" apply false
|
||||||
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.17"
|
id 'org.jlleitschuh.gradle.ktlint' version '10.2.0' apply false
|
||||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
@ -29,14 +28,6 @@ ext {
|
||||||
|
|
||||||
apply from: 'gradle/dependencies.gradle'
|
apply from: 'gradle/dependencies.gradle'
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
google()
|
|
||||||
maven { url 'https://jitpack.io' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
plugins {
|
||||||
apply plugin: 'kotlin-android'
|
id 'com.android.application'
|
||||||
|
id 'org.jetbrains.kotlin.android'
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
|
}
|
||||||
|
}
|
||||||
include ':app'
|
include ':app'
|
||||||
include ':contactsbackup'
|
include ':contactsbackup'
|
||||||
include ':storage:lib'
|
include ':storage:lib'
|
||||||
include ':storage:demo'
|
include ':storage:demo'
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'com.google.protobuf'
|
id 'com.google.protobuf'
|
||||||
id 'kotlin-android'
|
id 'org.jetbrains.kotlin.android'
|
||||||
id 'kotlin-kapt'
|
id 'org.jetbrains.kotlin.kapt'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.library'
|
id 'com.android.library'
|
||||||
id 'com.google.protobuf'
|
id 'com.google.protobuf'
|
||||||
id 'kotlin-android'
|
id 'org.jetbrains.kotlin.android'
|
||||||
id 'kotlin-kapt'
|
id 'org.jetbrains.kotlin.kapt'
|
||||||
id "org.jlleitschuh.gradle.ktlint" version "10.2.0"
|
id 'org.jetbrains.dokka'
|
||||||
id 'org.jetbrains.dokka' version "$kotlin_version"
|
id 'org.jlleitschuh.gradle.ktlint'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
Loading…
Reference in a new issue