Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 4daa97f

Browse files
authored
Merge pull request #12 from codee-team/buildscript-fix
refactor: `buildscript` moved to `buildSrc`
2 parents 8889b17 + 9b1c2e1 commit 4daa97f

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

‎build.gradle.kts‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
buildscript {
2-
repositories {
3-
google()
4-
mavenCentral()
5-
}
6-
dependencies {
7-
classpath(androidBuildTools)
8-
classpath(kotlinGradlePlugin)
9-
}
10-
}
1+
defaultBuildScript()
112

123
tasks.register("clean", Delete::class) {
134
delete(rootProject.buildDir)

‎buildSrc/src/main/kotlin/Projects.kt‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import `fun`.kotlingang.deploy.Deploy
22
import `fun`.kotlingang.deploy.DeployConfiguration
33
import org.gradle.api.Project
44
import org.gradle.kotlin.dsl.apply
5+
import org.gradle.kotlin.dsl.buildscript
56
import org.gradle.kotlin.dsl.configure
7+
import org.gradle.kotlin.dsl.repositories
68
import org.gradle.util.GUtil.loadProperties
79
import java.io.File
810

@@ -33,4 +35,15 @@ fun Project.coreDeploy() {
3335
deployTaskName = "release"
3436
}
3537
}
38+
}
39+
40+
fun Project.defaultBuildScript() = buildscript {
41+
repositories {
42+
google()
43+
mavenCentral()
44+
}
45+
dependencies {
46+
classpath(androidBuildTools)
47+
classpath(kotlinGradlePlugin)
48+
}
3649
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /