mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-25 02:18:24 +01:00
Update top level project build scripts
This commit is contained in:
parent
3f63b320c4
commit
81b2dfd9d0
@ -6,7 +6,6 @@ apply plugin: 'kotlin-android'
|
|||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
apply plugin: 'com.github.zellius.shortcut-helper'
|
apply plugin: 'com.github.zellius.shortcut-helper'
|
||||||
apply plugin: "org.jmailen.kotlinter"
|
|
||||||
|
|
||||||
shortcutHelper.filePath = './shortcuts.xml'
|
shortcutHelper.filePath = './shortcuts.xml'
|
||||||
|
|
||||||
@ -292,8 +291,7 @@ task copyResources(type: Copy) {
|
|||||||
include '**/*'
|
include '**/*'
|
||||||
}
|
}
|
||||||
|
|
||||||
preBuild.dependsOn(lintKotlin, copyResources)
|
preBuild.dependsOn(ktlintFormat, copyResources)
|
||||||
lintKotlin.dependsOn(formatKotlin)
|
|
||||||
|
|
||||||
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Standard")) {
|
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Standard")) {
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
@ -1,22 +1,9 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.github.ben-manes.versions") version "0.28.0"
|
id("com.android.application") version BuildPluginsVersion.AGP apply false
|
||||||
}
|
id("com.android.library") version BuildPluginsVersion.AGP apply false
|
||||||
|
kotlin("android") version BuildPluginsVersion.KOTLIN apply false
|
||||||
buildscript {
|
id("org.jlleitschuh.gradle.ktlint") version BuildPluginsVersion.KTLINT
|
||||||
repositories {
|
id("com.github.ben-manes.versions") version BuildPluginsVersion.VERSIONS_PLUGIN
|
||||||
google()
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath("com.android.tools.build:gradle:3.6.2")
|
|
||||||
classpath("com.github.zellius:android-shortcut-gradle-plugin:0.1.2")
|
|
||||||
classpath("org.jmailen.gradle:kotlinter-gradle:2.3.2")
|
|
||||||
classpath("com.google.gms:google-services:4.3.3")
|
|
||||||
classpath("com.google.android.gms:oss-licenses-plugin:0.10.2")
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
|
||||||
// in the individual module build.gradle files
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
@ -28,6 +15,38 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
apply {
|
||||||
|
plugin("org.jlleitschuh.gradle.ktlint")
|
||||||
|
}
|
||||||
|
|
||||||
|
ktlint {
|
||||||
|
debug.set(false)
|
||||||
|
version.set(Versions.KTLINT)
|
||||||
|
verbose.set(true)
|
||||||
|
android.set(false)
|
||||||
|
outputToConsole.set(true)
|
||||||
|
ignoreFailures.set(false)
|
||||||
|
enableExperimentalRules.set(true)
|
||||||
|
filter {
|
||||||
|
exclude("**/generated/**")
|
||||||
|
include("**/kotlin/**")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
dependencies {
|
||||||
|
classpath("com.github.zellius:android-shortcut-gradle-plugin:0.1.2")
|
||||||
|
classpath("com.google.gms:google-services:4.3.3")
|
||||||
|
classpath("com.google.android.gms:oss-licenses-plugin:0.10.2")
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.register("clean", Delete::class) {
|
tasks.register("clean", Delete::class) {
|
||||||
delete(rootProject.buildDir)
|
delete(rootProject.buildDir)
|
||||||
}
|
}
|
||||||
|
1
buildSrc/.gitignore
vendored
Normal file
1
buildSrc/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
6
buildSrc/build.gradle.kts
Normal file
6
buildSrc/build.gradle.kts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
10
buildSrc/src/main/kotlin/Dependencies.kt
Normal file
10
buildSrc/src/main/kotlin/Dependencies.kt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
object Versions {
|
||||||
|
const val KTLINT = "0.36.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
object BuildPluginsVersion {
|
||||||
|
const val AGP = "3.6.3"
|
||||||
|
const val KOTLIN = "1.3.72"
|
||||||
|
const val KTLINT = "9.2.1"
|
||||||
|
const val VERSIONS_PLUGIN = "0.28.0"
|
||||||
|
}
|
@ -1 +1,20 @@
|
|||||||
|
pluginManagement {
|
||||||
|
resolutionStrategy {
|
||||||
|
eachPlugin {
|
||||||
|
if (requested.id.id == "com.android.library") {
|
||||||
|
useModule("com.android.tools.build:gradle:${requested.version}")
|
||||||
|
}
|
||||||
|
if (requested.id.id == "com.android.application") {
|
||||||
|
useModule("com.android.tools.build:gradle:${requested.version}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include(":app")
|
include(":app")
|
||||||
|
Loading…
Reference in New Issue
Block a user