Initial commit
This initial commit includes HUSH specific changes starting at this commit:
d14637012c
This commit is contained in:
23
build-convention/build.gradle.kts
Normal file
23
build-convention/build.gradle.kts
Normal file
@@ -0,0 +1,23 @@
|
||||
import org.jetbrains.kotlin.konan.properties.loadProperties
|
||||
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
buildscript {
|
||||
dependencyLocking {
|
||||
lockAllConfigurations()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyLocking {
|
||||
lockAllConfigurations()
|
||||
}
|
||||
|
||||
// Per conversation in the KotlinLang Slack, Gradle uses Java 8 compatibility internally
|
||||
// for all build scripts.
|
||||
// https://kotlinlang.slack.com/archives/C19FD9681/p1636632870122900?thread_ts=1636572288.117000&cid=C19FD9681
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
45
build-convention/buildscript-gradle.lockfile
Normal file
45
build-convention/buildscript-gradle.lockfile
Normal file
@@ -0,0 +1,45 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
com.github.gundy:semver4j:0.16.4=classpath
|
||||
com.google.code.findbugs:jsr305:3.0.2=classpath
|
||||
com.google.code.gson:gson:2.8.9=classpath
|
||||
com.google.errorprone:error_prone_annotations:2.3.4=classpath
|
||||
com.google.guava:failureaccess:1.0.1=classpath
|
||||
com.google.guava:guava:29.0-jre=classpath
|
||||
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath
|
||||
com.google.j2objc:j2objc-annotations:1.3=classpath
|
||||
de.undercouch:gradle-download-task:4.1.1=classpath
|
||||
net.java.dev.jna:jna:5.6.0=classpath
|
||||
org.checkerframework:checker-qual:2.11.1=classpath
|
||||
org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:2.3.3=classpath
|
||||
org.gradle.kotlin:gradle-kotlin-dsl-plugins:2.3.3=classpath
|
||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=classpath
|
||||
org.jetbrains.kotlin:kotlin-android-extensions:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-build-common:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-compiler-runner:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-daemon-client:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-native-utils:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-project-model:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-tooling-metadata:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.6.21=classpath
|
||||
org.jetbrains.kotlin:kotlin-util-klib:1.6.21=classpath
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpath
|
||||
org.jetbrains:annotations:13.0=classpath
|
||||
empty=
|
||||
25
build-convention/gradle.lockfile
Normal file
25
build-convention/gradle.lockfile
Normal file
@@ -0,0 +1,25 @@
|
||||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath
|
||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath
|
||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.21=kotlinCompilerClasspath
|
||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.6.21=kotlinCompilerClasspath
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-native-utils:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-project-model:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-reflect:1.6.21=compileClasspath,kotlinCompilerClasspath
|
||||
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-script-runtime:1.6.21=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-scripting-common:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=compileClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=compileClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=compileClasspath
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.6.21=compileClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.6.21=kotlinCompilerPluginClasspathMain
|
||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain
|
||||
empty=annotationProcessor,runtimeClasspath
|
||||
31
build-convention/settings.gradle.kts
Normal file
31
build-convention/settings.gradle.kts
Normal file
@@ -0,0 +1,31 @@
|
||||
@Suppress("UnstableApiUsage")
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
val isRepoRestrictionEnabled = true
|
||||
|
||||
google {
|
||||
if (isRepoRestrictionEnabled) {
|
||||
content {
|
||||
includeGroup("androidx.navigation")
|
||||
includeGroup("com.android.tools")
|
||||
includeGroup("com.google.testing.platform")
|
||||
includeGroupByRegex("androidx.*")
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
includeGroupByRegex("com\\.android\\.tools.*")
|
||||
}
|
||||
}
|
||||
}
|
||||
mavenCentral {
|
||||
if (isRepoRestrictionEnabled) {
|
||||
content {
|
||||
excludeGroup("androidx.navigation")
|
||||
excludeGroup("com.android.tools")
|
||||
excludeGroup("com.google.testing.platform")
|
||||
excludeGroupByRegex("androidx.*")
|
||||
excludeGroupByRegex("com\\.android.*")
|
||||
excludeGroupByRegex("com\\.android\\.tools.*")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
plugins {
|
||||
id("java")
|
||||
}
|
||||
|
||||
val ktlint by configurations.creating
|
||||
|
||||
dependencies {
|
||||
ktlint("com.pinterest:ktlint:${project.property("KTLINT_VERSION")}") {
|
||||
attributes {
|
||||
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named<Bundling>(Bundling.EXTERNAL))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
val editorConfigFile = rootProject.file(".editorconfig")
|
||||
val ktlintArgs = listOf("**/src/**/*.kt", "!**/build/**.kt", "--editorconfig=$editorConfigFile")
|
||||
|
||||
register("ktlint", org.gradle.api.tasks.JavaExec::class) {
|
||||
description = "Check code style with ktlint"
|
||||
classpath = ktlint
|
||||
mainClass.set("com.pinterest.ktlint.Main")
|
||||
args = ktlintArgs
|
||||
}
|
||||
|
||||
register("ktlintFormat", org.gradle.api.tasks.JavaExec::class) {
|
||||
// Workaround for ktlint bug; force to run on an older JDK
|
||||
// https://github.com/pinterest/ktlint/issues/1274
|
||||
javaLauncher.set(javaToolchains.launcherFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_11.majorVersion))
|
||||
})
|
||||
|
||||
description = "Apply code style formatting with ktlint"
|
||||
classpath = ktlint
|
||||
mainClass.set("com.pinterest.ktlint.Main")
|
||||
args = listOf("-F") + ktlintArgs
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
val javaVersion = JavaVersion.toVersion(project.property("ANDROID_JVM_TARGET").toString())
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
}
|
||||
Reference in New Issue
Block a user