mirror of
https://github.com/github/codeql.git
synced 2026-01-06 19:20:25 +01:00
This adds a single plain Gradle project that uses a modern Kotlin build script (i.e. settings.gradle.kts and no build.gradle.kts), plus basic Android samples exercising the possible permutations of: (old vs. new-style build script, Groovy vs. Kotlin build script, wrapper present vs. absent) Old vs. new style tests our recognition of different cues that this is likely a Droid project and requires `gradle assemble` not `gradle testClasses` (the example given at https://developer.android.com/studio/build/#top-level changed style as of plugin version ~7.3.0). Groovy vs. Kotlin build script language checks that the regexes recognising Android dependencies and versions work for both build script kinds. Wrapper present vs. absent exercises the autobuilder logic that guesses an appropriate Gradle version and sets it up in the event the Gradle wrapper isn't provided.
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
pluginManagement {
|
|
|
|
/**
|
|
* The pluginManagement {repositories {...}} block configures the
|
|
* repositories Gradle uses to search or download the Gradle plugins and
|
|
* their transitive dependencies. Gradle pre-configures support for remote
|
|
* repositories such as JCenter, Maven Central, and Ivy. You can also use
|
|
* local repositories or define your own remote repositories. The code below
|
|
* defines the Gradle Plugin Portal, Google's Maven repository,
|
|
* and the Maven Central Repository as the repositories Gradle should use to look for its
|
|
* dependencies.
|
|
*/
|
|
|
|
repositories {
|
|
gradlePluginPortal()
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
dependencyResolutionManagement {
|
|
|
|
/**
|
|
* The dependencyResolutionManagement {repositories {...}}
|
|
* block is where you configure the repositories and dependencies used by
|
|
* all modules in your project, such as libraries that you are using to
|
|
* create your application. However, you should configure module-specific
|
|
* dependencies in each module-level build.gradle file. For new projects,
|
|
* Android Studio includes Google's Maven repository and the Maven Central
|
|
* Repository by default, but it does not configure any dependencies (unless
|
|
* you select a template that requires some).
|
|
*/
|
|
|
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
rootProject.name = "Android Sample"
|
|
include(":project")
|