build: switch to modern plugin application layout

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2021-07-25 22:01:32 +05:30
parent ae00e8ce6e
commit f699d9cf9a
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80
4 changed files with 28 additions and 22 deletions

View File

@ -1,7 +1,6 @@
buildscript {
ext {
activityVersion = '1.2.4'
agpVersion = '7.0.0'
annotationsVersion = '1.2.0'
appcompatVersion = '1.3.1'
biometricVersion = '1.1.0'
@ -15,7 +14,6 @@ buildscript {
fragmentVersion = '1.3.6'
jsr305Version = '3.0.2'
junitVersion = '4.13.2'
kotlinVersion = '1.5.21'
lifecycleRuntimeKtxVersion = '2.3.1'
materialComponentsVersion = '1.4.0'
preferenceVersion = '1.1.1'
@ -23,14 +21,6 @@ buildscript {
groupName = 'com.wireguard.android'
}
dependencies {
classpath "com.android.tools.build:gradle:$agpVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
repositories {
google()
mavenCentral()
}
}
plugins {
@ -66,13 +56,6 @@ task crowdin(type: Copy, dependsOn: ['extractCrowdin']) {
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@ -1,8 +1,28 @@
pluginManagement {
def agpVersion = "7.0.0"
def kotlinVersion = "1.5.21"
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
plugins {
id("com.android.application") version "$agpVersion"
id("com.android.library") version "$agpVersion"
id("org.jetbrains.kotlin.android") version "$kotlinVersion"
id("org.jetbrains.kotlin.kapt") version "$kotlinVersion"
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "wireguard-android"
include ':tunnel'
include ':ui'

View File

@ -1,4 +1,6 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
}
version wireguardVersionName
group groupName

View File

@ -1,6 +1,8 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt'
}
version wireguardVersionName
group groupName
@ -64,7 +66,6 @@ dependencies {
implementation "androidx.coordinatorlayout:coordinatorlayout:$coordinatorLayoutVersion"
implementation "androidx.biometric:biometric:$biometricVersion"
implementation "androidx.core:core-ktx:$coreKtxVersion"
implementation "androidx.databinding:databinding-runtime:$agpVersion"
implementation "androidx.fragment:fragment-ktx:$fragmentVersion"
implementation "androidx.preference:preference-ktx:$preferenceVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleRuntimeKtxVersion"