summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-07-25 22:01:32 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-07-29 10:12:04 +0530
commitf699d9cf9af51c296590732bcc98f50949f37098 (patch)
tree14008b4c9747a41c41db0a1b06e240d5909efd84
parentae00e8ce6e07bf053d3ac47888762c44965aa491 (diff)
build: switch to modern plugin application layout
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r--build.gradle17
-rw-r--r--settings.gradle20
-rw-r--r--tunnel/build.gradle4
-rw-r--r--ui/build.gradle9
4 files changed, 28 insertions, 22 deletions
diff --git a/build.gradle b/build.gradle
index 791400b9..15ca9145 100644
--- a/build.gradle
+++ b/build.gradle
@@ -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
}
diff --git a/settings.gradle b/settings.gradle
index 7c707e32..0e89ecec 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -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'
diff --git a/tunnel/build.gradle b/tunnel/build.gradle
index 28d02804..7268a4d9 100644
--- a/tunnel/build.gradle
+++ b/tunnel/build.gradle
@@ -1,4 +1,6 @@
-apply plugin: 'com.android.library'
+plugins {
+ id 'com.android.library'
+}
version wireguardVersionName
group groupName
diff --git a/ui/build.gradle b/ui/build.gradle
index 6bf39bfa..53f24163 100644
--- a/ui/build.gradle
+++ b/ui/build.gradle
@@ -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"