-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (65 loc) · 2.2 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* Top-level build file for ftc_app project.
*
* It is extraordinarily rare that you will ever need to edit this file.
* This file has been updated for epicness -Arc
*/
configurations {
doc { transitive false }
}
buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_plugin_version}"
classpath "org.jlleitschuh.gradle:ktlint-gradle:${ktlint_plugin_version}"
classpath "org.mozilla.rust-android-gradle:plugin:${rust_android_gradle_version}"
}
}
// This is now required because aapt2 has to be downloaded from the
// google() repository beginning with version 3.2 of the Android Gradle Plugin
allprojects {
repositories {
mavenCentral()
google()
// TODO REMOVE JCENTER
//noinspection JcenterRepositoryObsolete
jcenter()
}
}
repositories {
mavenCentral()
flatDir {
dirs '../libs'
}
}
dependencies {
doc "org.firstinspires.ftc:Hardware:${ftc_libs_version}"
doc "org.firstinspires.ftc:RobotCore:${ftc_libs_version}"
doc "org.firstinspires.ftc:FtcCommon:${ftc_libs_version}"
doc "org.firstinspires.ftc:OnBotJava:${ftc_libs_version}"
doc "org.firstinspires.ftc:Inspection:${ftc_libs_version}"
}
task extractJavadoc {
doLast {
def componentIds = configurations.doc.incoming.resolutionResult.allDependencies.collect { it.selected.id }
def result = dependencies.createArtifactResolutionQuery()
.forComponents(componentIds)
.withArtifacts(JvmLibrary, SourcesArtifact, JavadocArtifact)
.execute()
for (component in result.resolvedComponents) {
component.getArtifacts(JavadocArtifact).each { artifact ->
def version = artifact.identifier.componentIdentifier.version
def libName = artifact.identifier.componentIdentifier.moduleIdentifier.name
copy {
from zipTree(artifact.file)
into "docs/$version/$libName/"
}
}
}
}
}