├── version.txt ├── .github ├── CODEOWNERS ├── FUNDING.yml └── workflows │ └── cid.yml ├── .gitignore ├── settings.gradle.kts ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── plugin ├── src │ └── main │ │ └── kotlin │ │ └── com │ │ └── supercilex │ │ └── gradle │ │ └── versions │ │ ├── internal │ │ ├── Constants.kt │ │ ├── Exec.kt │ │ ├── Io.kt │ │ ├── VersionOrchestratorRootPlugin.kt │ │ └── Validation.kt │ │ ├── VersionOrchestratorExtension.kt │ │ ├── tasks │ │ ├── RetrieveGitTagList.kt │ │ ├── RetrieveGitCommitCount.kt │ │ ├── RetrieveGitDescription.kt │ │ ├── ComputeVersionName.kt │ │ └── ComputeVersionCode.kt │ │ └── VersionOrchestratorPlugin.kt └── build.gradle.kts ├── gradlew.bat ├── CODE_OF_CONDUCT.md ├── README.md ├── gradlew ├── LICENSE └── .editorconfig /version.txt: -------------------------------------------------------------------------------- 1 | 0.10.0 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @SUPERCILEX 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: SUPERCILEX 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.iml 3 | .gradle 4 | build 5 | local.properties 6 | out 7 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `gradle-enterprise` 3 | } 4 | 5 | include(":plugin") 6 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 2 | org.gradle.parallel=true 3 | org.gradle.caching=true 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUPERCILEX/version-orchestrator/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/internal/Constants.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.internal 2 | 3 | internal const val VERSION_ORCHESTRATOR_PATH = "versionOrchestrator" 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/internal/Exec.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.internal 2 | 3 | import org.gradle.process.ExecOperations 4 | import org.gradle.process.ExecSpec 5 | import java.io.ByteArrayOutputStream 6 | 7 | internal fun ExecOperations.execWithOutput(block: ExecSpec.() -> Unit): String { 8 | val output = ByteArrayOutputStream() 9 | exec { 10 | block() 11 | standardOutput = output 12 | } 13 | return output.toString().trim() 14 | } 15 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/internal/Io.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.internal 2 | 3 | import java.io.File 4 | 5 | /** @return this directory after ensuring that it either already exists or was created */ 6 | internal fun File.safeMkdirs(): File = apply { 7 | val create = { exists() || mkdirs() } 8 | check(create() || create()) { "Unable to create $this" } 9 | } 10 | 11 | /** @return this file after ensuring that it either already exists or was created */ 12 | internal fun File.safeCreateNewFile(): File = apply { 13 | parentFile.safeMkdirs() 14 | 15 | val create = { exists() || createNewFile() } 16 | check(create() || create()) { "Unable to create $this" } 17 | } 18 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/internal/VersionOrchestratorRootPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.internal 2 | 3 | import com.supercilex.gradle.versions.tasks.RetrieveGitCommitCount 4 | import com.supercilex.gradle.versions.tasks.RetrieveGitDescription 5 | import com.supercilex.gradle.versions.tasks.RetrieveGitTagList 6 | import org.gradle.api.Plugin 7 | import org.gradle.api.Project 8 | import org.gradle.kotlin.dsl.register 9 | 10 | @Suppress("unused") // Used by Gradle 11 | internal class VersionOrchestratorRootPlugin : Plugin { 12 | override fun apply(project: Project) { 13 | check(project === project.rootProject) 14 | 15 | validateRuntime(project) 16 | 17 | val workingDir = project.layout.buildDirectory.dir("version-orchestrator/git") 18 | project.tasks.register("retrieveGitCommitCount") { 19 | commitCountFile.set(workingDir.map { it.file("commit-count.txt") }) 20 | } 21 | project.tasks.register("retrieveGitTagList") { 22 | tagListFile.set(workingDir.map { it.file("tag-list.txt") }) 23 | } 24 | project.tasks.register("retrieveGitDescription") { 25 | gitDescribeFile.set(workingDir.map { it.file("git-description.txt") }) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/VersionOrchestratorExtension.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions 2 | 3 | import org.gradle.api.provider.Property 4 | import org.gradle.api.tasks.Input 5 | import org.gradle.api.tasks.Internal 6 | 7 | /** The entry point for all Version Orchestrator related configuration. */ 8 | abstract class VersionOrchestratorExtension @JvmOverloads constructor( 9 | @Suppress("unused") 10 | @get:Internal 11 | internal val name: String = "default" // Needed for Gradle 12 | ) { 13 | /** 14 | * Enables or disables version configuration for debug builds. 15 | * 16 | * Defaults to `false`. 17 | */ 18 | @get:Input 19 | abstract val configureDebugBuilds: Property 20 | 21 | /** 22 | * Enables or disables version code configuration. 23 | * 24 | * Defaults to `true`. 25 | */ 26 | @get:Input 27 | abstract val configureVersionCode: Property 28 | 29 | /** 30 | * Enables or disables version name configuration. 31 | * 32 | * Defaults to `true`. 33 | */ 34 | @get:Input 35 | abstract val configureVersionName: Property 36 | 37 | /** 38 | * For existing apps: if you already have an established version code, put it here to tell VM to 39 | * increase its version code calculation by this amount. 40 | * 41 | * Defaults to `0`. 42 | */ 43 | @get:Input 44 | abstract val versionCodeOffset: Property 45 | } 46 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/internal/Validation.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.internal 2 | 3 | import com.android.build.api.AndroidPluginVersion 4 | import com.android.build.api.variant.ApplicationAndroidComponentsExtension 5 | import com.android.build.gradle.AppPlugin 6 | import org.gradle.api.Project 7 | import org.gradle.kotlin.dsl.findByType 8 | import org.gradle.kotlin.dsl.withType 9 | import org.gradle.util.GradleVersion 10 | 11 | private val MIN_GRADLE_VERSION = GradleVersion.version("7.0") 12 | private val MIN_AGP_VERSION = AndroidPluginVersion(7, 0) 13 | 14 | internal fun validateRuntime(project: Project) { 15 | val gradleVersion = GradleVersion.current() 16 | 17 | check(gradleVersion >= MIN_GRADLE_VERSION) { 18 | """ 19 | |Version Orchestrator's minimum Gradle version is at least $MIN_GRADLE_VERSION and yours 20 | |is $gradleVersion. Find the latest version at 21 | |https://github.com/gradle/gradle/releases/latest, then run 22 | |$ ./gradlew wrapper --gradle-version=${"$"}LATEST --distribution-type=ALL 23 | """.trimMargin() 24 | } 25 | 26 | project.plugins.withType { 27 | val agpVersion = project.extensions.findByType()?.pluginVersion 28 | 29 | check(null != agpVersion && agpVersion >= MIN_AGP_VERSION) { 30 | """ 31 | |Version Orchestrator's minimum Android Gradle Plugin version is at least 32 | |$MIN_AGP_VERSION and yours is $agpVersion. Find the latest version and upgrade 33 | |instructions at https://developer.android.com/studio/releases/gradle-plugin. 34 | """.trimMargin() 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/tasks/RetrieveGitTagList.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.tasks 2 | 3 | import com.supercilex.gradle.versions.internal.execWithOutput 4 | import com.supercilex.gradle.versions.internal.safeCreateNewFile 5 | import org.gradle.api.DefaultTask 6 | import org.gradle.api.file.RegularFileProperty 7 | import org.gradle.api.tasks.OutputFile 8 | import org.gradle.api.tasks.TaskAction 9 | import org.gradle.kotlin.dsl.submit 10 | import org.gradle.process.ExecOperations 11 | import org.gradle.workers.WorkAction 12 | import org.gradle.workers.WorkParameters 13 | import org.gradle.workers.WorkerExecutor 14 | import javax.inject.Inject 15 | 16 | internal abstract class RetrieveGitTagList @Inject constructor( 17 | private val executor: WorkerExecutor 18 | ) : DefaultTask() { 19 | @get:OutputFile 20 | abstract val tagListFile: RegularFileProperty 21 | 22 | init { 23 | // We don't know what's changed on the Git side of things 24 | outputs.upToDateWhen { false } 25 | } 26 | 27 | @TaskAction 28 | fun retrieveInfo() { 29 | executor.noIsolation().submit(Retriever::class) { 30 | tagList.set(tagListFile) 31 | } 32 | } 33 | 34 | abstract class Retriever @Inject constructor( 35 | private val execOps: ExecOperations 36 | ) : WorkAction { 37 | override fun execute() { 38 | val tagList = execOps.execWithOutput { 39 | commandLine("git", "tag", "--merged", "HEAD") 40 | } 41 | 42 | parameters.tagList.get().asFile.safeCreateNewFile().writeText(tagList) 43 | } 44 | 45 | interface Params : WorkParameters { 46 | val tagList: RegularFileProperty 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/tasks/RetrieveGitCommitCount.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.tasks 2 | 3 | import com.supercilex.gradle.versions.internal.execWithOutput 4 | import com.supercilex.gradle.versions.internal.safeCreateNewFile 5 | import org.gradle.api.DefaultTask 6 | import org.gradle.api.file.RegularFileProperty 7 | import org.gradle.api.tasks.OutputFile 8 | import org.gradle.api.tasks.TaskAction 9 | import org.gradle.kotlin.dsl.submit 10 | import org.gradle.process.ExecOperations 11 | import org.gradle.workers.WorkAction 12 | import org.gradle.workers.WorkParameters 13 | import org.gradle.workers.WorkerExecutor 14 | import javax.inject.Inject 15 | 16 | internal abstract class RetrieveGitCommitCount @Inject constructor( 17 | private val executor: WorkerExecutor 18 | ) : DefaultTask() { 19 | @get:OutputFile 20 | abstract val commitCountFile: RegularFileProperty 21 | 22 | init { 23 | // We don't know what's changed on the Git side of things 24 | outputs.upToDateWhen { false } 25 | } 26 | 27 | @TaskAction 28 | fun retrieveInfo() { 29 | executor.noIsolation().submit(Retriever::class) { 30 | commitCount.set(commitCountFile) 31 | } 32 | } 33 | 34 | abstract class Retriever @Inject constructor( 35 | private val execOps: ExecOperations 36 | ) : WorkAction { 37 | override fun execute() { 38 | val commitCount = execOps.execWithOutput { 39 | commandLine("git", "rev-list", "--count", "HEAD") 40 | } 41 | 42 | parameters.commitCount.get().asFile.safeCreateNewFile().writeText(commitCount) 43 | } 44 | 45 | interface Params : WorkParameters { 46 | val commitCount: RegularFileProperty 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/tasks/RetrieveGitDescription.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.tasks 2 | 3 | import com.supercilex.gradle.versions.internal.execWithOutput 4 | import com.supercilex.gradle.versions.internal.safeCreateNewFile 5 | import org.gradle.api.DefaultTask 6 | import org.gradle.api.file.RegularFileProperty 7 | import org.gradle.api.tasks.OutputFile 8 | import org.gradle.api.tasks.TaskAction 9 | import org.gradle.kotlin.dsl.submit 10 | import org.gradle.process.ExecOperations 11 | import org.gradle.workers.WorkAction 12 | import org.gradle.workers.WorkParameters 13 | import org.gradle.workers.WorkerExecutor 14 | import javax.inject.Inject 15 | 16 | internal abstract class RetrieveGitDescription @Inject constructor( 17 | private val executor: WorkerExecutor 18 | ) : DefaultTask() { 19 | @get:OutputFile 20 | abstract val gitDescribeFile: RegularFileProperty 21 | 22 | init { 23 | // We don't know what's changed on the Git side of things 24 | outputs.upToDateWhen { false } 25 | } 26 | 27 | @TaskAction 28 | fun retrieveInfo() { 29 | executor.noIsolation().submit(Retriever::class) { 30 | gitDescribe.set(gitDescribeFile) 31 | } 32 | } 33 | 34 | abstract class Retriever @Inject constructor( 35 | private val execOps: ExecOperations 36 | ) : WorkAction { 37 | override fun execute() { 38 | val gitDescribe = execOps.execWithOutput { 39 | commandLine("git", "describe", "--tags", "--always", "--dirty") 40 | } 41 | 42 | parameters.gitDescribe.get().asFile.safeCreateNewFile().writeText(gitDescribe) 43 | } 44 | 45 | interface Params : WorkParameters { 46 | val gitDescribe: RegularFileProperty 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/tasks/ComputeVersionName.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.tasks 2 | 3 | import com.supercilex.gradle.versions.internal.safeCreateNewFile 4 | import org.gradle.api.DefaultTask 5 | import org.gradle.api.file.RegularFileProperty 6 | import org.gradle.api.tasks.CacheableTask 7 | import org.gradle.api.tasks.InputFile 8 | import org.gradle.api.tasks.OutputFile 9 | import org.gradle.api.tasks.PathSensitive 10 | import org.gradle.api.tasks.PathSensitivity 11 | import org.gradle.api.tasks.TaskAction 12 | import org.gradle.kotlin.dsl.submit 13 | import org.gradle.workers.WorkAction 14 | import org.gradle.workers.WorkParameters 15 | import org.gradle.workers.WorkerExecutor 16 | import javax.inject.Inject 17 | 18 | @CacheableTask 19 | internal abstract class ComputeVersionName @Inject constructor( 20 | private val executor: WorkerExecutor 21 | ) : DefaultTask() { 22 | @get:PathSensitive(PathSensitivity.RELATIVE) 23 | @get:InputFile 24 | abstract val gitDescribeFile: RegularFileProperty 25 | 26 | @get:OutputFile 27 | abstract val versionNameFile: RegularFileProperty 28 | 29 | @TaskAction 30 | fun computeVersions() { 31 | executor.noIsolation().submit(Computer::class) { 32 | gitDescribe.set(gitDescribeFile) 33 | 34 | versionName.set(versionNameFile) 35 | } 36 | } 37 | 38 | abstract class Computer : WorkAction { 39 | override fun execute() { 40 | val versionName = parameters.gitDescribe.get().asFile.readText() 41 | 42 | parameters.versionName.get().asFile.safeCreateNewFile().writeText(versionName) 43 | } 44 | 45 | interface Params : WorkParameters { 46 | val gitDescribe: RegularFileProperty 47 | 48 | val versionName: RegularFileProperty 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/tasks/ComputeVersionCode.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions.tasks 2 | 3 | import com.supercilex.gradle.versions.internal.safeCreateNewFile 4 | import org.gradle.api.DefaultTask 5 | import org.gradle.api.file.RegularFileProperty 6 | import org.gradle.api.provider.Property 7 | import org.gradle.api.tasks.CacheableTask 8 | import org.gradle.api.tasks.Input 9 | import org.gradle.api.tasks.InputFile 10 | import org.gradle.api.tasks.OutputFile 11 | import org.gradle.api.tasks.PathSensitive 12 | import org.gradle.api.tasks.PathSensitivity 13 | import org.gradle.api.tasks.TaskAction 14 | import org.gradle.kotlin.dsl.submit 15 | import org.gradle.util.VersionNumber 16 | import org.gradle.workers.WorkAction 17 | import org.gradle.workers.WorkParameters 18 | import org.gradle.workers.WorkerExecutor 19 | import javax.inject.Inject 20 | 21 | @CacheableTask 22 | internal abstract class ComputeVersionCode @Inject constructor( 23 | private val executor: WorkerExecutor 24 | ) : DefaultTask() { 25 | @get:Input 26 | abstract val versionCodeOffset: Property 27 | 28 | @get:PathSensitive(PathSensitivity.RELATIVE) 29 | @get:InputFile 30 | abstract val commitCountFile: RegularFileProperty 31 | 32 | @get:PathSensitive(PathSensitivity.RELATIVE) 33 | @get:InputFile 34 | abstract val tagListFile: RegularFileProperty 35 | 36 | @get:PathSensitive(PathSensitivity.RELATIVE) 37 | @get:InputFile 38 | abstract val gitDescribeFile: RegularFileProperty 39 | 40 | @get:OutputFile 41 | abstract val versionCodeFile: RegularFileProperty 42 | 43 | @TaskAction 44 | fun computeVersions() { 45 | executor.noIsolation().submit(Computer::class) { 46 | offset.set(versionCodeOffset) 47 | commitCount.set(commitCountFile) 48 | tagList.set(tagListFile) 49 | gitDescribe.set(gitDescribeFile) 50 | 51 | versionCode.set(versionCodeFile) 52 | } 53 | } 54 | 55 | abstract class Computer : WorkAction { 56 | override fun execute() { 57 | val commitCountFileContents = parameters.commitCount.get().asFile.readText() 58 | val tagListFileContents = parameters.tagList.get().asFile.readText() 59 | val gitDescribeFileContents = parameters.gitDescribe.get().asFile.readText() 60 | 61 | val tags = tagListFileContents.split("\n") 62 | val minorTags = tags.map { VersionNumber.parse(it) }.filter { it.micro == 0 } 63 | val isCleanlyOnTag = gitDescribeFileContents 64 | .removePrefix(tags.lastOrNull().orEmpty()).take(1).length xor 1 65 | 66 | val offset = parameters.offset.get() 67 | val commitCount = commitCountFileContents.toLong() 68 | val minorTagsCount = minorTags.size 69 | val hotfixSpacing = (minorTagsCount - isCleanlyOnTag).coerceAtLeast(0) * 100 70 | 71 | val versionCode = (offset + commitCount + minorTagsCount + hotfixSpacing).toString() 72 | parameters.versionCode.get().asFile.safeCreateNewFile().writeText(versionCode) 73 | } 74 | 75 | interface Params : WorkParameters { 76 | val offset: Property 77 | val commitCount: RegularFileProperty 78 | val tagList: RegularFileProperty 79 | val gitDescribe: RegularFileProperty 80 | 81 | val versionCode: RegularFileProperty 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to make participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies within all project spaces, and it also applies when 49 | an individual is representing the project or its community in public spaces. 50 | Examples of representing a project or community include using an official 51 | project e-mail address, posting via an official social media account, or acting 52 | as an appointed representative at an online or offline event. Representation of 53 | a project may be further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at vm-coc@supercilex.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /plugin/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `java-gradle-plugin` 3 | `kotlin-dsl` 4 | `maven-publish` 5 | id("com.gradle.plugin-publish") 6 | } 7 | 8 | dependencies { 9 | // Compile only to not force a specific AGP version 10 | compileOnly("com.android.tools.build:gradle:7.0.0") 11 | } 12 | 13 | java { 14 | withJavadocJar() 15 | withSourcesJar() 16 | } 17 | 18 | tasks.withType().configureEach { 19 | enableStricterValidation.set(true) 20 | } 21 | 22 | val versionName = providers.fileContents(rootProject.layout.projectDirectory.file("version.txt")) 23 | .asText.forUseAtConfigurationTime().get().trim() 24 | group = "com.supercilex.gradle" 25 | version = versionName 26 | 27 | tasks.withType().configureEach { 28 | isEnabled = versionName.contains("snapshot", true) 29 | } 30 | 31 | gradlePlugin { 32 | plugins.create("versions") { 33 | id = "com.supercilex.gradle.versions" 34 | displayName = "Version Orchestrator" 35 | description = "Version Orchestrator provides an effortless and performant way to " + 36 | "automate versioning your Android app." 37 | implementationClass = "com.supercilex.gradle.versions.VersionOrchestratorPlugin" 38 | } 39 | } 40 | 41 | pluginBundle { 42 | website = "https://github.com/SUPERCILEX/version-orchestrator" 43 | vcsUrl = "https://github.com/SUPERCILEX/version-orchestrator" 44 | tags = listOf("android", "version", "versions", "versioning", "publishing") 45 | 46 | mavenCoordinates { 47 | groupId = project.group as String 48 | artifactId = "version-orchestrator" 49 | } 50 | } 51 | 52 | publishing { 53 | repositories { 54 | maven { 55 | name = "Snapshots" 56 | url = uri("https://oss.sonatype.org/content/repositories/snapshots/") 57 | 58 | credentials { 59 | username = providers.environmentVariable("SONATYPE_NEXUS_USERNAME") 60 | .forUseAtConfigurationTime().orNull 61 | password = providers.environmentVariable("SONATYPE_NEXUS_PASSWORD") 62 | .forUseAtConfigurationTime().orNull 63 | } 64 | } 65 | } 66 | } 67 | 68 | afterEvaluate { 69 | publishing.publications.named("pluginMaven") { 70 | artifactId = "version-orchestrator" 71 | 72 | pom { 73 | name.set("Version Orchestrator") 74 | description.set( 75 | "Version Orchestrator provides an effortless and performant way to automate " + 76 | "versioning your Android app.") 77 | url.set("https://github.com/SUPERCILEX/version-orchestrator") 78 | 79 | licenses { 80 | license { 81 | name.set("Apache License, Version 2.0") 82 | url.set("https://opensource.org/licenses/Apache-2.0") 83 | distribution.set("repo") 84 | } 85 | } 86 | 87 | developers { 88 | developer { 89 | id.set("SUPERCILEX") 90 | name.set("Alex Saveau") 91 | email.set("saveau.alexandre@gmail.com") 92 | roles.set(listOf("Owner")) 93 | timezone.set("-8") 94 | } 95 | } 96 | 97 | scm { 98 | connection.set("scm:git@github.com:SUPERCILEX/version-orchestrator.git") 99 | developerConnection.set("scm:git@github.com:SUPERCILEX/version-orchestrator.git") 100 | url.set("https://github.com/SUPERCILEX/version-orchestrator") 101 | } 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /.github/workflows/cid.yml: -------------------------------------------------------------------------------- 1 | name: CI/CD 2 | 3 | on: [push, pull_request] 4 | env: 5 | GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v2 13 | - name: Install JDK 14 | uses: actions/setup-java@v1 15 | with: 16 | java-version: 11 17 | - name: Gradle Cache 18 | uses: actions/cache@v2 19 | with: 20 | path: | 21 | ~/.gradle/caches 22 | ~/.gradle/wrapper 23 | key: ${{ runner.os }}-v2-gradle-${{ hashFiles('**/*') }} 24 | restore-keys: | 25 | ${{ runner.os }}-v2-gradle- 26 | - name: Validate Gradle integrity 27 | uses: gradle/wrapper-validation-action@v1 28 | - name: Build project 29 | run: ./gradlew assemble -S 30 | 31 | test: 32 | runs-on: ubuntu-latest 33 | steps: 34 | - name: Checkout 35 | uses: actions/checkout@v2 36 | - name: Install JDK 37 | uses: actions/setup-java@v1 38 | with: 39 | java-version: 11 40 | - name: Gradle Cache 41 | uses: actions/cache@v2 42 | with: 43 | path: | 44 | ~/.gradle/caches 45 | ~/.gradle/wrapper 46 | key: ${{ runner.os }}-v2-gradle-test-${{ hashFiles('**/*') }} 47 | restore-keys: | 48 | ${{ runner.os }}-v2-gradle-test- 49 | ${{ runner.os }}-v2-gradle- 50 | - name: Run tests 51 | run: ./gradlew check test -S 52 | 53 | deploy_snapshot: 54 | needs: [build, test] 55 | runs-on: ubuntu-latest 56 | if: github.ref == 'refs/heads/master' 57 | steps: 58 | - name: Checkout 59 | uses: actions/checkout@v2 60 | - name: Install JDK 61 | uses: actions/setup-java@v1 62 | with: 63 | java-version: 11 64 | - name: Gradle Cache 65 | uses: actions/cache@v2 66 | with: 67 | path: | 68 | ~/.gradle/caches 69 | ~/.gradle/wrapper 70 | key: ${{ runner.os }}-v2-gradle-deploy-snapshot-${{ hashFiles('**/*') }} 71 | restore-keys: | 72 | ${{ runner.os }}-v2-gradle-deploy-snapshot- 73 | ${{ runner.os }}-v2-gradle-deploy- 74 | ${{ runner.os }}-v2-gradle- 75 | - name: Build project 76 | run: ./gradlew assemble 77 | - name: Publish snapshot 78 | run: ./gradlew publish 79 | env: 80 | SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} 81 | SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} 82 | 83 | deploy_release: 84 | needs: [build, test] 85 | runs-on: ubuntu-latest 86 | if: startsWith(github.ref, 'refs/tags/') 87 | steps: 88 | - name: Checkout 89 | uses: actions/checkout@v2 90 | - name: Install JDK 91 | uses: actions/setup-java@v1 92 | with: 93 | java-version: 11 94 | - name: Gradle Cache 95 | uses: actions/cache@v2 96 | with: 97 | path: | 98 | ~/.gradle/caches 99 | ~/.gradle/wrapper 100 | key: ${{ runner.os }}-v2-gradle-deploy-release-${{ hashFiles('**/*') }} 101 | restore-keys: | 102 | ${{ runner.os }}-v2-gradle-deploy-release- 103 | ${{ runner.os }}-v2-gradle-deploy- 104 | ${{ runner.os }}-v2-gradle- 105 | - name: Build project 106 | run: ./gradlew assemble 107 | - name: Publish release 108 | run: ./gradlew publishPlugins -Pgradle.publish.key=$PUBLISH_KEY -Pgradle.publish.secret=$PUBLISH_SECRET 109 | env: 110 | PUBLISH_KEY: ${{ secrets.PUBLISH_KEY }} 111 | PUBLISH_SECRET: ${{ secrets.PUBLISH_SECRET }} 112 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Version Orchestrator 3 |

4 | 5 |

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

14 | 15 | Version Orchestrator provides an effortless and performant way to automate versioning your Android 16 | app. 17 | 18 | ## Table of contents 19 | 20 | 1. [How does it work?](#how-does-it-work) 21 | 1. [Version codes](#version-codes) 22 | 1. [Version names](#version-names) 23 | 1. [Installation](#installation) 24 | 1. [Snapshot builds](#snapshot-builds) 25 | 1. [Configuring Version Orchestrator](#configuring-version-orchestrator) 26 | 1. [Disabling version code configuration](#disabling-version-code-configuration) 27 | 1. [Disabling version name configuration](#disabling-version-name-configuration) 28 | 1. [Enabling debug build configuration](#enabling-debug-build-configuration) 29 | 1. [For existing apps](#for-existing-apps) 30 | 31 | ## How does it work? 32 | 33 | Version Orchestrator looks at your Git history to compute a version code and name for your app. 34 | 35 | ### Version codes 36 | 37 | The version code is a combination of the number of commits in your repository and your tag history, 38 | enabling support for hotfix releases. The math looks a little like this: 39 | 40 | ```kt 41 | versionCode = existingAppOffset + 42 | commitCount + 43 | numberOfNonPatchTags + 44 | 100 * numberOfNonPatchTagsMinusOneIfIsRelease 45 | ``` 46 | 47 | For example, you have 4 commits and tag a `1.0.0` release (`versionCode = 5`). On your 48 | 5th commit, the version code will jump to `106`. You continue making commits until you realize a 49 | critical bug needs to be fixed. Branching off the `1.0.0` release, you fix the bug and tag your 50 | `1.0.1` hotfix (`versionCode = 6`). After merging the hotfix and 3 other commits from your new 51 | features back into master, you create a `1.1.0` release (`versionCode = 110`). On your 11th commit, 52 | the version code will jump to `211`. This continues on, allowing you to make 100 patch releases for 53 | each major or minor release. 54 | 55 | ### Version names 56 | 57 | The version name is a combination of the latest tag, commit hash, dirtiness flag, and variant name. 58 | Currently, it is calculated using [`git describe`](https://git-scm.com/docs/git-describe#_examples) 59 | and your `buildType` name plus `productFlavor` name (if present). 60 | 61 | ## Installation 62 | 63 | Apply the plugin to each individual `com.android.application` module where you want to use Version 64 | Orchestrator through the `plugins {}` DSL: 65 | 66 |
Kotlin 67 | 68 | ```kt 69 | plugins { 70 | id("com.android.application") 71 | id("com.supercilex.gradle.versions") version "0.10.0" 72 | } 73 | ``` 74 | 75 |
76 | 77 |
Groovy 78 | 79 | ```groovy 80 | plugins { 81 | id 'com.android.application' 82 | id 'com.supercilex.gradle.versions' version '0.10.0' 83 | } 84 | ``` 85 | 86 |
87 | 88 | ### Snapshot builds 89 | 90 | If you're prepared to cut yourself on the bleeding edge of Version Orchestrator development, 91 | snapshot builds are available from 92 | [Sonatype's `snapshots` repository](https://oss.sonatype.org/content/repositories/snapshots/com/supercilex/gradle/version-orchestrator/): 93 | 94 |
Kotlin 95 | 96 | ```kt 97 | buildscript { 98 | repositories { 99 | // ... 100 | maven("https://oss.sonatype.org/content/repositories/snapshots") 101 | } 102 | 103 | dependencies { 104 | // ... 105 | classpath("com.supercilex.gradle:version-orchestrator:1.0.0-SNAPSHOT") 106 | } 107 | } 108 | ``` 109 | 110 |
111 | 112 |
Groovy 113 | 114 | ```groovy 115 | buildscript { 116 | repositories { 117 | // ... 118 | maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } 119 | } 120 | 121 | dependencies { 122 | // ... 123 | classpath 'com.supercilex.gradle:version-orchestrator:1.0.0-SNAPSHOT' 124 | } 125 | } 126 | ``` 127 | 128 |
129 | 130 | ## Configuring Version Orchestrator 131 | 132 | Version Orchestrator offers several options to fit your use case. 133 | 134 | ### Disabling version code configuration 135 | 136 | To handle version codes yourself, disable version code configuration: 137 | 138 | ```kt 139 | versionOrchestrator { 140 | configureVersionCode.set(false) 141 | } 142 | ``` 143 | 144 | ### Disabling version name configuration 145 | 146 | To handle version names yourself, disable version name configuration: 147 | 148 | ```kt 149 | versionOrchestrator { 150 | configureVersionName.set(false) 151 | } 152 | ``` 153 | 154 | ### Enabling debug build configuration 155 | 156 | To make debug builds as fast as possible, version codes and names are never changed in debug builds 157 | by default. To enable versioning, enable debug build configuration: 158 | 159 | ```kt 160 | versionOrchestrator { 161 | configureDebugBuilds.set(true) 162 | } 163 | ``` 164 | 165 | ### For existing apps 166 | 167 | If your app already has an established version code, you can tell Version Orchestrator about it: 168 | 169 | ```kt 170 | versionOrchestrator { 171 | versionCodeOffset.set(123) 172 | } 173 | ``` 174 | -------------------------------------------------------------------------------- /plugin/src/main/kotlin/com/supercilex/gradle/versions/VersionOrchestratorPlugin.kt: -------------------------------------------------------------------------------- 1 | package com.supercilex.gradle.versions 2 | 3 | import com.android.build.api.component.analytics.AnalyticsEnabledApplicationVariant 4 | import com.android.build.api.variant.ApplicationAndroidComponentsExtension 5 | import com.android.build.api.variant.ApplicationVariant 6 | import com.android.build.api.variant.impl.VariantOutputImpl 7 | import com.android.build.gradle.AppPlugin 8 | import com.android.build.gradle.internal.component.ComponentCreationConfig 9 | import com.android.build.gradle.internal.dsl.BaseAppModuleExtension 10 | import com.supercilex.gradle.versions.internal.VERSION_ORCHESTRATOR_PATH 11 | import com.supercilex.gradle.versions.internal.VersionOrchestratorRootPlugin 12 | import com.supercilex.gradle.versions.tasks.ComputeVersionCode 13 | import com.supercilex.gradle.versions.tasks.ComputeVersionName 14 | import com.supercilex.gradle.versions.tasks.RetrieveGitCommitCount 15 | import com.supercilex.gradle.versions.tasks.RetrieveGitDescription 16 | import com.supercilex.gradle.versions.tasks.RetrieveGitTagList 17 | import org.gradle.api.Plugin 18 | import org.gradle.api.Project 19 | import org.gradle.api.plugins.BasePluginConvention 20 | import org.gradle.kotlin.dsl.apply 21 | import org.gradle.kotlin.dsl.create 22 | import org.gradle.kotlin.dsl.findPlugin 23 | import org.gradle.kotlin.dsl.getByType 24 | import org.gradle.kotlin.dsl.getPlugin 25 | import org.gradle.kotlin.dsl.invoke 26 | import org.gradle.kotlin.dsl.named 27 | import org.gradle.kotlin.dsl.register 28 | import org.gradle.kotlin.dsl.the 29 | import org.gradle.kotlin.dsl.withType 30 | 31 | @Suppress("unused") // Used by Gradle 32 | internal class VersionOrchestratorPlugin : Plugin { 33 | override fun apply(project: Project) { 34 | project.rootProject.plugins.apply(VersionOrchestratorRootPlugin::class) 35 | 36 | project.extensions.create(VERSION_ORCHESTRATOR_PATH).apply { 37 | configureDebugBuilds.convention(false) 38 | configureVersionCode.convention(true) 39 | configureVersionName.convention(true) 40 | versionCodeOffset.convention(0) 41 | } 42 | 43 | project.plugins.withType { 44 | applyInternal(project) 45 | } 46 | project.afterEvaluate { 47 | if (project.plugins.findPlugin(AppPlugin::class) == null) { 48 | throw IllegalStateException( 49 | "The Android Gradle Plugin was not applied. Version Orchestrator " + 50 | "cannot be configured.") 51 | } 52 | } 53 | } 54 | 55 | private fun applyInternal(project: Project) { 56 | val extension = project.extensions.getByType() 57 | val android = project.the() 58 | val workingDir = project.layout.buildDirectory.dir("version-orchestrator") 59 | 60 | val computeVersionCode = 61 | project.tasks.register("computeAppVersionCode") 62 | val computeVersionName = 63 | project.tasks.register("computeAppVersionName") 64 | 65 | computeVersionCode { 66 | versionCodeOffset.set(extension.versionCodeOffset) 67 | 68 | commitCountFile.set(project.rootProject.tasks.named( 69 | "retrieveGitCommitCount", 70 | RetrieveGitCommitCount::class 71 | ).flatMap { it.commitCountFile }) 72 | tagListFile.set(project.rootProject.tasks.named( 73 | "retrieveGitTagList", 74 | RetrieveGitTagList::class 75 | ).flatMap { it.tagListFile }) 76 | gitDescribeFile.set(project.rootProject.tasks.named( 77 | "retrieveGitDescription", 78 | RetrieveGitDescription::class 79 | ).flatMap { it.gitDescribeFile }) 80 | 81 | versionCodeFile.set(workingDir.map { it.file("version-code.txt") }) 82 | } 83 | 84 | computeVersionName { 85 | gitDescribeFile.set(project.rootProject.tasks.named( 86 | "retrieveGitDescription", 87 | RetrieveGitDescription::class 88 | ).flatMap { it.gitDescribeFile }) 89 | 90 | versionNameFile.set(workingDir.map { it.file("version-name.txt") }) 91 | } 92 | 93 | val basePlugin = project.convention.getPlugin() 94 | val androidExtension = project.extensions.getByType() 95 | androidExtension.onVariants v@{ variant -> 96 | val shouldConfigureDebugBuilds = 97 | extension.configureDebugBuilds.forUseAtConfigurationTime().get() 98 | if (getDebuggableHack(variant) && !shouldConfigureDebugBuilds) { 99 | return@v 100 | } 101 | 102 | for (output in variant.outputs) { 103 | if (extension.configureVersionCode.forUseAtConfigurationTime().get()) { 104 | output.versionCode.set(computeVersionCode.map { 105 | it.versionCodeFile.get().asFile.readText().toInt() 106 | }) 107 | } 108 | 109 | if (extension.configureVersionName.forUseAtConfigurationTime().get()) { 110 | output as VariantOutputImpl 111 | output.versionName.set(computeVersionName.map { 112 | it.versionNameFile.get().asFile.readText() + "-" + output.baseName 113 | }) 114 | output.outputFileName.set(computeVersionName.map { 115 | "${basePlugin.archivesBaseName}-${variant.applicationId.get()}-" + 116 | "${output.versionName.get()}.apk" 117 | }) 118 | } 119 | } 120 | } 121 | } 122 | 123 | private fun getDebuggableHack(variant: ApplicationVariant): Boolean { 124 | val hackToGetDebuggable = 125 | ((variant as? AnalyticsEnabledApplicationVariant)?.delegate ?: variant) 126 | as ComponentCreationConfig 127 | return hackToGetDebuggable.debuggable 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | indent_size = 4 5 | indent_style = space 6 | insert_final_newline = true 7 | max_line_length = 100 8 | tab_width = 4 9 | trim_trailing_whitespace = true 10 | ij_continuation_indent_size = 8 11 | ij_formatter_off_tag = @formatter:off 12 | ij_formatter_on_tag = @formatter:on 13 | ij_formatter_tags_enabled = false 14 | ij_smart_tabs = false 15 | ij_wrap_on_typing = false 16 | 17 | [*.css] 18 | ij_css_align_closing_brace_with_properties = false 19 | ij_css_blank_lines_around_nested_selector = 1 20 | ij_css_blank_lines_between_blocks = 1 21 | ij_css_brace_placement = 0 22 | ij_css_hex_color_long_format = false 23 | ij_css_hex_color_lower_case = false 24 | ij_css_hex_color_short_format = false 25 | ij_css_hex_color_upper_case = false 26 | ij_css_keep_blank_lines_in_code = 2 27 | ij_css_keep_indents_on_empty_lines = false 28 | ij_css_keep_single_line_blocks = false 29 | ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 30 | ij_css_space_after_colon = true 31 | ij_css_space_before_opening_brace = true 32 | ij_css_value_alignment = 0 33 | 34 | [*.java] 35 | ij_java_align_consecutive_assignments = false 36 | ij_java_align_consecutive_variable_declarations = false 37 | ij_java_align_group_field_declarations = false 38 | ij_java_align_multiline_annotation_parameters = false 39 | ij_java_align_multiline_array_initializer_expression = false 40 | ij_java_align_multiline_assignment = false 41 | ij_java_align_multiline_binary_operation = false 42 | ij_java_align_multiline_chained_methods = false 43 | ij_java_align_multiline_extends_list = false 44 | ij_java_align_multiline_for = false 45 | ij_java_align_multiline_method_parentheses = false 46 | ij_java_align_multiline_parameters = false 47 | ij_java_align_multiline_parameters_in_calls = false 48 | ij_java_align_multiline_parenthesized_expression = false 49 | ij_java_align_multiline_resources = false 50 | ij_java_align_multiline_ternary_operation = false 51 | ij_java_align_multiline_throws_list = false 52 | ij_java_align_subsequent_simple_methods = false 53 | ij_java_align_throws_keyword = false 54 | ij_java_annotation_parameter_wrap = off 55 | ij_java_array_initializer_new_line_after_left_brace = false 56 | ij_java_array_initializer_right_brace_on_new_line = false 57 | ij_java_array_initializer_wrap = normal 58 | ij_java_assert_statement_colon_on_next_line = false 59 | ij_java_assert_statement_wrap = off 60 | ij_java_assignment_wrap = off 61 | ij_java_binary_operation_sign_on_next_line = true 62 | ij_java_binary_operation_wrap = normal 63 | ij_java_blank_lines_after_anonymous_class_header = 0 64 | ij_java_blank_lines_after_class_header = 1 65 | ij_java_blank_lines_after_imports = 1 66 | ij_java_blank_lines_after_package = 1 67 | ij_java_blank_lines_around_class = 1 68 | ij_java_blank_lines_around_field = 0 69 | ij_java_blank_lines_around_field_in_interface = 0 70 | ij_java_blank_lines_around_initializer = 1 71 | ij_java_blank_lines_around_method = 1 72 | ij_java_blank_lines_around_method_in_interface = 1 73 | ij_java_blank_lines_before_class_end = 0 74 | ij_java_blank_lines_before_imports = 1 75 | ij_java_blank_lines_before_method_body = 0 76 | ij_java_blank_lines_before_package = 0 77 | ij_java_block_brace_style = end_of_line 78 | ij_java_block_comment_at_first_column = false 79 | ij_java_call_parameters_new_line_after_left_paren = false 80 | ij_java_call_parameters_right_paren_on_new_line = false 81 | ij_java_call_parameters_wrap = normal 82 | ij_java_case_statement_on_separate_line = true 83 | ij_java_catch_on_new_line = false 84 | ij_java_class_annotation_wrap = split_into_lines 85 | ij_java_class_brace_style = end_of_line 86 | ij_java_class_count_to_use_import_on_demand = 999 87 | ij_java_class_names_in_javadoc = 1 88 | ij_java_do_not_indent_top_level_class_members = false 89 | ij_java_do_not_wrap_after_single_annotation = false 90 | ij_java_do_while_brace_force = always 91 | ij_java_doc_add_blank_line_after_description = true 92 | ij_java_doc_add_blank_line_after_param_comments = false 93 | ij_java_doc_add_blank_line_after_return = false 94 | ij_java_doc_add_p_tag_on_empty_lines = false 95 | ij_java_doc_align_exception_comments = false 96 | ij_java_doc_align_param_comments = false 97 | ij_java_doc_do_not_wrap_if_one_line = false 98 | ij_java_doc_enable_formatting = true 99 | ij_java_doc_enable_leading_asterisks = true 100 | ij_java_doc_indent_on_continuation = false 101 | ij_java_doc_keep_empty_lines = true 102 | ij_java_doc_keep_empty_parameter_tag = false 103 | ij_java_doc_keep_empty_return_tag = false 104 | ij_java_doc_keep_empty_throws_tag = false 105 | ij_java_doc_keep_invalid_tags = true 106 | ij_java_doc_param_description_on_new_line = false 107 | ij_java_doc_preserve_line_breaks = false 108 | ij_java_doc_use_throws_not_exception_tag = true 109 | ij_java_else_on_new_line = false 110 | ij_java_enum_constants_wrap = off 111 | ij_java_extends_keyword_wrap = off 112 | ij_java_extends_list_wrap = normal 113 | ij_java_field_annotation_wrap = split_into_lines 114 | ij_java_finally_on_new_line = false 115 | ij_java_for_brace_force = always 116 | ij_java_for_statement_new_line_after_left_paren = false 117 | ij_java_for_statement_right_paren_on_new_line = false 118 | ij_java_for_statement_wrap = normal 119 | ij_java_generate_final_locals = false 120 | ij_java_generate_final_parameters = false 121 | ij_java_if_brace_force = always 122 | ij_java_imports_layout = $*, |, * 123 | ij_java_indent_case_from_switch = true 124 | ij_java_insert_inner_class_imports = true 125 | ij_java_insert_override_annotation = true 126 | ij_java_keep_blank_lines_before_right_brace = 2 127 | ij_java_keep_blank_lines_between_package_declaration_and_header = 2 128 | ij_java_keep_blank_lines_in_code = 1 129 | ij_java_keep_blank_lines_in_declarations = 2 130 | ij_java_keep_control_statement_in_one_line = false 131 | ij_java_keep_first_column_comment = true 132 | ij_java_keep_indents_on_empty_lines = false 133 | ij_java_keep_line_breaks = true 134 | ij_java_keep_multiple_expressions_in_one_line = false 135 | ij_java_keep_simple_blocks_in_one_line = false 136 | ij_java_keep_simple_classes_in_one_line = false 137 | ij_java_keep_simple_lambdas_in_one_line = false 138 | ij_java_keep_simple_methods_in_one_line = false 139 | ij_java_lambda_brace_style = end_of_line 140 | ij_java_layout_static_imports_separately = true 141 | ij_java_line_comment_add_space = true 142 | ij_java_line_comment_at_first_column = false 143 | ij_java_method_annotation_wrap = split_into_lines 144 | ij_java_method_brace_style = end_of_line 145 | ij_java_method_call_chain_wrap = normal 146 | ij_java_method_parameters_new_line_after_left_paren = false 147 | ij_java_method_parameters_right_paren_on_new_line = false 148 | ij_java_method_parameters_wrap = normal 149 | ij_java_modifier_list_wrap = false 150 | ij_java_names_count_to_use_import_on_demand = 999 151 | ij_java_parameter_annotation_wrap = off 152 | ij_java_parentheses_expression_new_line_after_left_paren = false 153 | ij_java_parentheses_expression_right_paren_on_new_line = false 154 | ij_java_place_assignment_sign_on_next_line = false 155 | ij_java_prefer_longer_names = true 156 | ij_java_prefer_parameters_wrap = false 157 | ij_java_repeat_synchronized = true 158 | ij_java_replace_instanceof_and_cast = false 159 | ij_java_replace_null_check = true 160 | ij_java_replace_sum_lambda_with_method_ref = true 161 | ij_java_resource_list_new_line_after_left_paren = false 162 | ij_java_resource_list_right_paren_on_new_line = false 163 | ij_java_resource_list_wrap = off 164 | ij_java_space_after_closing_angle_bracket_in_type_argument = false 165 | ij_java_space_after_colon = true 166 | ij_java_space_after_comma = true 167 | ij_java_space_after_comma_in_type_arguments = true 168 | ij_java_space_after_for_semicolon = true 169 | ij_java_space_after_quest = true 170 | ij_java_space_after_type_cast = true 171 | ij_java_space_before_annotation_array_initializer_left_brace = false 172 | ij_java_space_before_annotation_parameter_list = false 173 | ij_java_space_before_array_initializer_left_brace = false 174 | ij_java_space_before_catch_keyword = true 175 | ij_java_space_before_catch_left_brace = true 176 | ij_java_space_before_catch_parentheses = true 177 | ij_java_space_before_class_left_brace = true 178 | ij_java_space_before_colon = true 179 | ij_java_space_before_colon_in_foreach = true 180 | ij_java_space_before_comma = false 181 | ij_java_space_before_do_left_brace = true 182 | ij_java_space_before_else_keyword = true 183 | ij_java_space_before_else_left_brace = true 184 | ij_java_space_before_finally_keyword = true 185 | ij_java_space_before_finally_left_brace = true 186 | ij_java_space_before_for_left_brace = true 187 | ij_java_space_before_for_parentheses = true 188 | ij_java_space_before_for_semicolon = false 189 | ij_java_space_before_if_left_brace = true 190 | ij_java_space_before_if_parentheses = true 191 | ij_java_space_before_method_call_parentheses = false 192 | ij_java_space_before_method_left_brace = true 193 | ij_java_space_before_method_parentheses = false 194 | ij_java_space_before_opening_angle_bracket_in_type_parameter = false 195 | ij_java_space_before_quest = true 196 | ij_java_space_before_switch_left_brace = true 197 | ij_java_space_before_switch_parentheses = true 198 | ij_java_space_before_synchronized_left_brace = true 199 | ij_java_space_before_synchronized_parentheses = true 200 | ij_java_space_before_try_left_brace = true 201 | ij_java_space_before_try_parentheses = true 202 | ij_java_space_before_type_parameter_list = false 203 | ij_java_space_before_while_keyword = true 204 | ij_java_space_before_while_left_brace = true 205 | ij_java_space_before_while_parentheses = true 206 | ij_java_space_inside_one_line_enum_braces = false 207 | ij_java_space_within_empty_array_initializer_braces = false 208 | ij_java_space_within_empty_method_call_parentheses = false 209 | ij_java_space_within_empty_method_parentheses = false 210 | ij_java_spaces_around_additive_operators = true 211 | ij_java_spaces_around_assignment_operators = true 212 | ij_java_spaces_around_bitwise_operators = true 213 | ij_java_spaces_around_equality_operators = true 214 | ij_java_spaces_around_lambda_arrow = true 215 | ij_java_spaces_around_logical_operators = true 216 | ij_java_spaces_around_method_ref_dbl_colon = false 217 | ij_java_spaces_around_multiplicative_operators = true 218 | ij_java_spaces_around_relational_operators = true 219 | ij_java_spaces_around_shift_operators = true 220 | ij_java_spaces_around_type_bounds_in_type_parameters = true 221 | ij_java_spaces_around_unary_operator = false 222 | ij_java_spaces_within_angle_brackets = false 223 | ij_java_spaces_within_annotation_parentheses = false 224 | ij_java_spaces_within_array_initializer_braces = false 225 | ij_java_spaces_within_braces = false 226 | ij_java_spaces_within_brackets = false 227 | ij_java_spaces_within_cast_parentheses = false 228 | ij_java_spaces_within_catch_parentheses = false 229 | ij_java_spaces_within_for_parentheses = false 230 | ij_java_spaces_within_if_parentheses = false 231 | ij_java_spaces_within_method_call_parentheses = false 232 | ij_java_spaces_within_method_parentheses = false 233 | ij_java_spaces_within_parentheses = false 234 | ij_java_spaces_within_switch_parentheses = false 235 | ij_java_spaces_within_synchronized_parentheses = false 236 | ij_java_spaces_within_try_parentheses = false 237 | ij_java_spaces_within_while_parentheses = false 238 | ij_java_special_else_if_treatment = true 239 | ij_java_subclass_name_suffix = Impl 240 | ij_java_ternary_operation_signs_on_next_line = true 241 | ij_java_ternary_operation_wrap = normal 242 | ij_java_test_name_suffix = Test 243 | ij_java_throws_keyword_wrap = normal 244 | ij_java_throws_list_wrap = off 245 | ij_java_use_external_annotations = false 246 | ij_java_use_fq_class_names = false 247 | ij_java_use_single_class_imports = true 248 | ij_java_variable_annotation_wrap = off 249 | ij_java_visibility = public 250 | ij_java_while_brace_force = always 251 | ij_java_while_on_new_line = false 252 | ij_java_wrap_comments = true 253 | ij_java_wrap_first_method_in_call_chain = false 254 | ij_java_wrap_long_lines = false 255 | 256 | [*.properties] 257 | ij_properties_align_group_field_declarations = false 258 | 259 | [.editorconfig] 260 | ij_editorconfig_align_group_field_declarations = false 261 | ij_editorconfig_space_after_colon = false 262 | ij_editorconfig_space_after_comma = true 263 | ij_editorconfig_space_before_colon = false 264 | ij_editorconfig_space_before_comma = false 265 | ij_editorconfig_spaces_around_assignment_operators = true 266 | 267 | [{*.ats, *.ts}] 268 | max_line_length = 80 269 | ij_typescript_align_imports = false 270 | ij_typescript_align_multiline_array_initializer_expression = false 271 | ij_typescript_align_multiline_binary_operation = false 272 | ij_typescript_align_multiline_chained_methods = false 273 | ij_typescript_align_multiline_extends_list = false 274 | ij_typescript_align_multiline_for = true 275 | ij_typescript_align_multiline_parameters = true 276 | ij_typescript_align_multiline_parameters_in_calls = false 277 | ij_typescript_align_multiline_ternary_operation = false 278 | ij_typescript_align_object_properties = 0 279 | ij_typescript_align_union_types = false 280 | ij_typescript_align_var_statements = 0 281 | ij_typescript_array_initializer_new_line_after_left_brace = false 282 | ij_typescript_array_initializer_right_brace_on_new_line = false 283 | ij_typescript_array_initializer_wrap = off 284 | ij_typescript_assignment_wrap = off 285 | ij_typescript_binary_operation_sign_on_next_line = false 286 | ij_typescript_binary_operation_wrap = off 287 | ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**/*, @angular/material, @angular/material/typings/** 288 | ij_typescript_blank_lines_after_imports = 1 289 | ij_typescript_blank_lines_around_class = 1 290 | ij_typescript_blank_lines_around_field = 0 291 | ij_typescript_blank_lines_around_field_in_interface = 0 292 | ij_typescript_blank_lines_around_function = 1 293 | ij_typescript_blank_lines_around_method = 1 294 | ij_typescript_blank_lines_around_method_in_interface = 1 295 | ij_typescript_block_brace_style = end_of_line 296 | ij_typescript_call_parameters_new_line_after_left_paren = false 297 | ij_typescript_call_parameters_right_paren_on_new_line = false 298 | ij_typescript_call_parameters_wrap = off 299 | ij_typescript_catch_on_new_line = false 300 | ij_typescript_chained_call_dot_on_new_line = true 301 | ij_typescript_class_brace_style = end_of_line 302 | ij_typescript_comma_on_new_line = false 303 | ij_typescript_do_while_brace_force = never 304 | ij_typescript_else_on_new_line = false 305 | ij_typescript_enforce_trailing_comma = keep 306 | ij_typescript_extends_keyword_wrap = off 307 | ij_typescript_extends_list_wrap = off 308 | ij_typescript_field_prefix = _ 309 | ij_typescript_file_name_style = relaxed 310 | ij_typescript_finally_on_new_line = false 311 | ij_typescript_for_brace_force = never 312 | ij_typescript_for_statement_new_line_after_left_paren = false 313 | ij_typescript_for_statement_right_paren_on_new_line = false 314 | ij_typescript_for_statement_wrap = off 315 | ij_typescript_force_quote_style = false 316 | ij_typescript_force_semicolon_style = false 317 | ij_typescript_function_expression_brace_style = end_of_line 318 | ij_typescript_if_brace_force = never 319 | ij_typescript_import_merge_members = global 320 | ij_typescript_import_prefer_absolute_path = global 321 | ij_typescript_import_sort_members = true 322 | ij_typescript_import_sort_module_name = false 323 | ij_typescript_import_use_node_resolution = true 324 | ij_typescript_imports_wrap = off 325 | ij_typescript_indent_case_from_switch = true 326 | ij_typescript_indent_chained_calls = true 327 | ij_typescript_indent_package_children = 0 328 | ij_typescript_jsdoc_include_types = false 329 | ij_typescript_jsx_attribute_value = braces 330 | ij_typescript_keep_blank_lines_in_code = 2 331 | ij_typescript_keep_first_column_comment = true 332 | ij_typescript_keep_indents_on_empty_lines = false 333 | ij_typescript_keep_line_breaks = true 334 | ij_typescript_keep_simple_blocks_in_one_line = false 335 | ij_typescript_keep_simple_methods_in_one_line = false 336 | ij_typescript_line_comment_add_space = true 337 | ij_typescript_line_comment_at_first_column = false 338 | ij_typescript_method_brace_style = end_of_line 339 | ij_typescript_method_call_chain_wrap = off 340 | ij_typescript_method_parameters_new_line_after_left_paren = false 341 | ij_typescript_method_parameters_right_paren_on_new_line = false 342 | ij_typescript_method_parameters_wrap = off 343 | ij_typescript_object_literal_wrap = on_every_item 344 | ij_typescript_parentheses_expression_new_line_after_left_paren = false 345 | ij_typescript_parentheses_expression_right_paren_on_new_line = false 346 | ij_typescript_place_assignment_sign_on_next_line = false 347 | ij_typescript_prefer_as_type_cast = false 348 | ij_typescript_prefer_parameters_wrap = false 349 | ij_typescript_reformat_c_style_comments = false 350 | ij_typescript_space_after_colon = true 351 | ij_typescript_space_after_comma = true 352 | ij_typescript_space_after_dots_in_rest_parameter = false 353 | ij_typescript_space_after_generator_mult = true 354 | ij_typescript_space_after_property_colon = true 355 | ij_typescript_space_after_quest = true 356 | ij_typescript_space_after_type_colon = true 357 | ij_typescript_space_after_unary_not = false 358 | ij_typescript_space_before_async_arrow_lparen = true 359 | ij_typescript_space_before_catch_keyword = true 360 | ij_typescript_space_before_catch_left_brace = true 361 | ij_typescript_space_before_catch_parentheses = true 362 | ij_typescript_space_before_class_lbrace = true 363 | ij_typescript_space_before_class_left_brace = true 364 | ij_typescript_space_before_colon = true 365 | ij_typescript_space_before_comma = false 366 | ij_typescript_space_before_do_left_brace = true 367 | ij_typescript_space_before_else_keyword = true 368 | ij_typescript_space_before_else_left_brace = true 369 | ij_typescript_space_before_finally_keyword = true 370 | ij_typescript_space_before_finally_left_brace = true 371 | ij_typescript_space_before_for_left_brace = true 372 | ij_typescript_space_before_for_parentheses = true 373 | ij_typescript_space_before_for_semicolon = false 374 | ij_typescript_space_before_function_left_parenth = true 375 | ij_typescript_space_before_generator_mult = false 376 | ij_typescript_space_before_if_left_brace = true 377 | ij_typescript_space_before_if_parentheses = true 378 | ij_typescript_space_before_method_call_parentheses = false 379 | ij_typescript_space_before_method_left_brace = true 380 | ij_typescript_space_before_method_parentheses = false 381 | ij_typescript_space_before_property_colon = false 382 | ij_typescript_space_before_quest = true 383 | ij_typescript_space_before_switch_left_brace = true 384 | ij_typescript_space_before_switch_parentheses = true 385 | ij_typescript_space_before_try_left_brace = true 386 | ij_typescript_space_before_type_colon = false 387 | ij_typescript_space_before_unary_not = false 388 | ij_typescript_space_before_while_keyword = true 389 | ij_typescript_space_before_while_left_brace = true 390 | ij_typescript_space_before_while_parentheses = true 391 | ij_typescript_spaces_around_additive_operators = true 392 | ij_typescript_spaces_around_arrow_function_operator = true 393 | ij_typescript_spaces_around_assignment_operators = true 394 | ij_typescript_spaces_around_bitwise_operators = true 395 | ij_typescript_spaces_around_equality_operators = true 396 | ij_typescript_spaces_around_logical_operators = true 397 | ij_typescript_spaces_around_multiplicative_operators = true 398 | ij_typescript_spaces_around_relational_operators = true 399 | ij_typescript_spaces_around_shift_operators = true 400 | ij_typescript_spaces_around_unary_operator = false 401 | ij_typescript_spaces_within_array_initializer_brackets = false 402 | ij_typescript_spaces_within_brackets = false 403 | ij_typescript_spaces_within_catch_parentheses = false 404 | ij_typescript_spaces_within_for_parentheses = false 405 | ij_typescript_spaces_within_if_parentheses = false 406 | ij_typescript_spaces_within_imports = false 407 | ij_typescript_spaces_within_interpolation_expressions = false 408 | ij_typescript_spaces_within_method_call_parentheses = false 409 | ij_typescript_spaces_within_method_parentheses = false 410 | ij_typescript_spaces_within_object_literal_braces = false 411 | ij_typescript_spaces_within_object_type_braces = true 412 | ij_typescript_spaces_within_parentheses = false 413 | ij_typescript_spaces_within_switch_parentheses = false 414 | ij_typescript_spaces_within_type_assertion = false 415 | ij_typescript_spaces_within_union_types = true 416 | ij_typescript_spaces_within_while_parentheses = false 417 | ij_typescript_special_else_if_treatment = true 418 | ij_typescript_ternary_operation_signs_on_next_line = false 419 | ij_typescript_ternary_operation_wrap = off 420 | ij_typescript_union_types_wrap = on_every_item 421 | ij_typescript_use_chained_calls_group_indents = true 422 | ij_typescript_use_double_quotes = false 423 | ij_typescript_use_explicit_js_extension = global 424 | ij_typescript_use_path_mapping = always 425 | ij_typescript_use_public_modifier = false 426 | ij_typescript_use_semicolon_after_statement = true 427 | ij_typescript_var_declaration_wrap = normal 428 | ij_typescript_while_brace_force = never 429 | ij_typescript_while_on_new_line = false 430 | ij_typescript_wrap_comments = false 431 | 432 | [{*.gant, *.groovy, *.gradle, *.gdsl, *.gy}] 433 | ij_groovy_align_group_field_declarations = false 434 | ij_groovy_align_multiline_array_initializer_expression = false 435 | ij_groovy_align_multiline_assignment = false 436 | ij_groovy_align_multiline_binary_operation = false 437 | ij_groovy_align_multiline_chained_methods = false 438 | ij_groovy_align_multiline_extends_list = false 439 | ij_groovy_align_multiline_for = true 440 | ij_groovy_align_multiline_method_parentheses = false 441 | ij_groovy_align_multiline_parameters = true 442 | ij_groovy_align_multiline_parameters_in_calls = false 443 | ij_groovy_align_multiline_resources = true 444 | ij_groovy_align_multiline_ternary_operation = false 445 | ij_groovy_align_multiline_throws_list = false 446 | ij_groovy_align_throws_keyword = false 447 | ij_groovy_array_initializer_new_line_after_left_brace = false 448 | ij_groovy_array_initializer_right_brace_on_new_line = false 449 | ij_groovy_array_initializer_wrap = off 450 | ij_groovy_assert_statement_wrap = off 451 | ij_groovy_assignment_wrap = off 452 | ij_groovy_binary_operation_wrap = off 453 | ij_groovy_blank_lines_after_class_header = 0 454 | ij_groovy_blank_lines_after_imports = 1 455 | ij_groovy_blank_lines_after_package = 1 456 | ij_groovy_blank_lines_around_class = 1 457 | ij_groovy_blank_lines_around_field = 0 458 | ij_groovy_blank_lines_around_field_in_interface = 0 459 | ij_groovy_blank_lines_around_method = 1 460 | ij_groovy_blank_lines_around_method_in_interface = 1 461 | ij_groovy_blank_lines_before_imports = 1 462 | ij_groovy_blank_lines_before_method_body = 0 463 | ij_groovy_blank_lines_before_package = 0 464 | ij_groovy_block_brace_style = end_of_line 465 | ij_groovy_block_comment_at_first_column = true 466 | ij_groovy_call_parameters_new_line_after_left_paren = false 467 | ij_groovy_call_parameters_right_paren_on_new_line = false 468 | ij_groovy_call_parameters_wrap = off 469 | ij_groovy_catch_on_new_line = false 470 | ij_groovy_class_annotation_wrap = split_into_lines 471 | ij_groovy_class_brace_style = end_of_line 472 | ij_groovy_do_while_brace_force = never 473 | ij_groovy_else_on_new_line = false 474 | ij_groovy_enum_constants_wrap = off 475 | ij_groovy_extends_keyword_wrap = off 476 | ij_groovy_extends_list_wrap = off 477 | ij_groovy_field_annotation_wrap = split_into_lines 478 | ij_groovy_finally_on_new_line = false 479 | ij_groovy_for_brace_force = never 480 | ij_groovy_for_statement_new_line_after_left_paren = false 481 | ij_groovy_for_statement_right_paren_on_new_line = false 482 | ij_groovy_for_statement_wrap = off 483 | ij_groovy_if_brace_force = never 484 | ij_groovy_indent_case_from_switch = true 485 | ij_groovy_keep_blank_lines_before_right_brace = 2 486 | ij_groovy_keep_blank_lines_in_code = 2 487 | ij_groovy_keep_blank_lines_in_declarations = 2 488 | ij_groovy_keep_control_statement_in_one_line = true 489 | ij_groovy_keep_first_column_comment = true 490 | ij_groovy_keep_indents_on_empty_lines = false 491 | ij_groovy_keep_line_breaks = true 492 | ij_groovy_keep_multiple_expressions_in_one_line = false 493 | ij_groovy_keep_simple_blocks_in_one_line = false 494 | ij_groovy_keep_simple_classes_in_one_line = true 495 | ij_groovy_keep_simple_lambdas_in_one_line = true 496 | ij_groovy_keep_simple_methods_in_one_line = true 497 | ij_groovy_lambda_brace_style = end_of_line 498 | ij_groovy_line_comment_add_space = false 499 | ij_groovy_line_comment_at_first_column = true 500 | ij_groovy_method_annotation_wrap = split_into_lines 501 | ij_groovy_method_brace_style = end_of_line 502 | ij_groovy_method_call_chain_wrap = off 503 | ij_groovy_method_parameters_new_line_after_left_paren = false 504 | ij_groovy_method_parameters_right_paren_on_new_line = false 505 | ij_groovy_method_parameters_wrap = off 506 | ij_groovy_modifier_list_wrap = false 507 | ij_groovy_parameter_annotation_wrap = off 508 | ij_groovy_parentheses_expression_new_line_after_left_paren = false 509 | ij_groovy_parentheses_expression_right_paren_on_new_line = false 510 | ij_groovy_prefer_parameters_wrap = false 511 | ij_groovy_resource_list_new_line_after_left_paren = false 512 | ij_groovy_resource_list_right_paren_on_new_line = false 513 | ij_groovy_resource_list_wrap = off 514 | ij_groovy_space_after_colon = true 515 | ij_groovy_space_after_comma = true 516 | ij_groovy_space_after_comma_in_type_arguments = true 517 | ij_groovy_space_after_for_semicolon = true 518 | ij_groovy_space_after_quest = true 519 | ij_groovy_space_after_type_cast = true 520 | ij_groovy_space_before_annotation_parameter_list = false 521 | ij_groovy_space_before_array_initializer_left_brace = false 522 | ij_groovy_space_before_catch_keyword = true 523 | ij_groovy_space_before_catch_left_brace = true 524 | ij_groovy_space_before_catch_parentheses = true 525 | ij_groovy_space_before_class_left_brace = true 526 | ij_groovy_space_before_colon = true 527 | ij_groovy_space_before_comma = false 528 | ij_groovy_space_before_do_left_brace = true 529 | ij_groovy_space_before_else_keyword = true 530 | ij_groovy_space_before_else_left_brace = true 531 | ij_groovy_space_before_finally_keyword = true 532 | ij_groovy_space_before_finally_left_brace = true 533 | ij_groovy_space_before_for_left_brace = true 534 | ij_groovy_space_before_for_parentheses = true 535 | ij_groovy_space_before_for_semicolon = false 536 | ij_groovy_space_before_if_left_brace = true 537 | ij_groovy_space_before_if_parentheses = true 538 | ij_groovy_space_before_method_call_parentheses = false 539 | ij_groovy_space_before_method_left_brace = true 540 | ij_groovy_space_before_method_parentheses = false 541 | ij_groovy_space_before_quest = true 542 | ij_groovy_space_before_switch_left_brace = true 543 | ij_groovy_space_before_switch_parentheses = true 544 | ij_groovy_space_before_synchronized_left_brace = true 545 | ij_groovy_space_before_synchronized_parentheses = true 546 | ij_groovy_space_before_try_left_brace = true 547 | ij_groovy_space_before_try_parentheses = true 548 | ij_groovy_space_before_while_keyword = true 549 | ij_groovy_space_before_while_left_brace = true 550 | ij_groovy_space_before_while_parentheses = true 551 | ij_groovy_space_within_empty_array_initializer_braces = false 552 | ij_groovy_space_within_empty_method_call_parentheses = false 553 | ij_groovy_spaces_around_additive_operators = true 554 | ij_groovy_spaces_around_assignment_operators = true 555 | ij_groovy_spaces_around_bitwise_operators = true 556 | ij_groovy_spaces_around_equality_operators = true 557 | ij_groovy_spaces_around_lambda_arrow = true 558 | ij_groovy_spaces_around_logical_operators = true 559 | ij_groovy_spaces_around_multiplicative_operators = true 560 | ij_groovy_spaces_around_relational_operators = true 561 | ij_groovy_spaces_around_shift_operators = true 562 | ij_groovy_spaces_within_annotation_parentheses = false 563 | ij_groovy_spaces_within_array_initializer_braces = false 564 | ij_groovy_spaces_within_braces = true 565 | ij_groovy_spaces_within_brackets = false 566 | ij_groovy_spaces_within_cast_parentheses = false 567 | ij_groovy_spaces_within_catch_parentheses = false 568 | ij_groovy_spaces_within_for_parentheses = false 569 | ij_groovy_spaces_within_if_parentheses = false 570 | ij_groovy_spaces_within_method_call_parentheses = false 571 | ij_groovy_spaces_within_method_parentheses = false 572 | ij_groovy_spaces_within_parentheses = false 573 | ij_groovy_spaces_within_switch_parentheses = false 574 | ij_groovy_spaces_within_synchronized_parentheses = false 575 | ij_groovy_spaces_within_try_parentheses = false 576 | ij_groovy_spaces_within_while_parentheses = false 577 | ij_groovy_special_else_if_treatment = true 578 | ij_groovy_ternary_operation_wrap = off 579 | ij_groovy_throws_keyword_wrap = off 580 | ij_groovy_throws_list_wrap = off 581 | ij_groovy_variable_annotation_wrap = off 582 | ij_groovy_while_brace_force = never 583 | ij_groovy_while_on_new_line = false 584 | ij_groovy_wrap_long_lines = false 585 | 586 | [{*.jhm, *.xslt, *.xul, *.rng, *.xsl, *.xsd, *.ant, *.tld, *.fxml, *.wsdl, *.jrxml, *.xml, *.jnlp, *.pom}] 587 | ij_xml_block_comment_at_first_column = true 588 | ij_xml_keep_indents_on_empty_lines = false 589 | ij_xml_line_comment_at_first_column = true 590 | ij_xml_use_custom_settings = true 591 | 592 | [{*.js, *.cjs}] 593 | max_line_length = 80 594 | ij_javascript_align_imports = false 595 | ij_javascript_align_multiline_array_initializer_expression = false 596 | ij_javascript_align_multiline_binary_operation = false 597 | ij_javascript_align_multiline_chained_methods = false 598 | ij_javascript_align_multiline_extends_list = false 599 | ij_javascript_align_multiline_for = false 600 | ij_javascript_align_multiline_parameters = false 601 | ij_javascript_align_multiline_parameters_in_calls = false 602 | ij_javascript_align_multiline_ternary_operation = false 603 | ij_javascript_align_object_properties = 0 604 | ij_javascript_align_union_types = false 605 | ij_javascript_align_var_statements = 0 606 | ij_javascript_array_initializer_new_line_after_left_brace = false 607 | ij_javascript_array_initializer_right_brace_on_new_line = false 608 | ij_javascript_array_initializer_wrap = normal 609 | ij_javascript_assignment_wrap = off 610 | ij_javascript_binary_operation_sign_on_next_line = true 611 | ij_javascript_binary_operation_wrap = normal 612 | ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**/*, @angular/material, @angular/material/typings/** 613 | ij_javascript_blank_lines_after_imports = 1 614 | ij_javascript_blank_lines_around_class = 1 615 | ij_javascript_blank_lines_around_field = 0 616 | ij_javascript_blank_lines_around_function = 1 617 | ij_javascript_blank_lines_around_method = 1 618 | ij_javascript_block_brace_style = end_of_line 619 | ij_javascript_call_parameters_new_line_after_left_paren = false 620 | ij_javascript_call_parameters_right_paren_on_new_line = false 621 | ij_javascript_call_parameters_wrap = normal 622 | ij_javascript_catch_on_new_line = false 623 | ij_javascript_chained_call_dot_on_new_line = true 624 | ij_javascript_class_brace_style = end_of_line 625 | ij_javascript_comma_on_new_line = false 626 | ij_javascript_do_while_brace_force = always 627 | ij_javascript_else_on_new_line = false 628 | ij_javascript_enforce_trailing_comma = keep 629 | ij_javascript_extends_keyword_wrap = off 630 | ij_javascript_extends_list_wrap = off 631 | ij_javascript_field_prefix = _ 632 | ij_javascript_file_name_style = relaxed 633 | ij_javascript_finally_on_new_line = false 634 | ij_javascript_for_brace_force = always 635 | ij_javascript_for_statement_new_line_after_left_paren = false 636 | ij_javascript_for_statement_right_paren_on_new_line = false 637 | ij_javascript_for_statement_wrap = normal 638 | ij_javascript_force_quote_style = false 639 | ij_javascript_force_semicolon_style = false 640 | ij_javascript_function_expression_brace_style = end_of_line 641 | ij_javascript_if_brace_force = always 642 | ij_javascript_import_merge_members = global 643 | ij_javascript_import_prefer_absolute_path = global 644 | ij_javascript_import_sort_members = true 645 | ij_javascript_import_sort_module_name = false 646 | ij_javascript_import_use_node_resolution = true 647 | ij_javascript_imports_wrap = on_every_item 648 | ij_javascript_indent_case_from_switch = true 649 | ij_javascript_indent_chained_calls = true 650 | ij_javascript_indent_package_children = 0 651 | ij_javascript_jsx_attribute_value = braces 652 | ij_javascript_keep_blank_lines_in_code = 1 653 | ij_javascript_keep_first_column_comment = true 654 | ij_javascript_keep_indents_on_empty_lines = false 655 | ij_javascript_keep_line_breaks = true 656 | ij_javascript_keep_simple_blocks_in_one_line = false 657 | ij_javascript_keep_simple_methods_in_one_line = false 658 | ij_javascript_line_comment_add_space = true 659 | ij_javascript_line_comment_at_first_column = false 660 | ij_javascript_method_brace_style = end_of_line 661 | ij_javascript_method_call_chain_wrap = off 662 | ij_javascript_method_parameters_new_line_after_left_paren = false 663 | ij_javascript_method_parameters_right_paren_on_new_line = false 664 | ij_javascript_method_parameters_wrap = normal 665 | ij_javascript_object_literal_wrap = on_every_item 666 | ij_javascript_parentheses_expression_new_line_after_left_paren = false 667 | ij_javascript_parentheses_expression_right_paren_on_new_line = false 668 | ij_javascript_place_assignment_sign_on_next_line = false 669 | ij_javascript_prefer_as_type_cast = false 670 | ij_javascript_prefer_parameters_wrap = false 671 | ij_javascript_reformat_c_style_comments = false 672 | ij_javascript_space_after_colon = true 673 | ij_javascript_space_after_comma = true 674 | ij_javascript_space_after_dots_in_rest_parameter = false 675 | ij_javascript_space_after_generator_mult = true 676 | ij_javascript_space_after_property_colon = true 677 | ij_javascript_space_after_quest = true 678 | ij_javascript_space_after_type_colon = true 679 | ij_javascript_space_after_unary_not = false 680 | ij_javascript_space_before_async_arrow_lparen = true 681 | ij_javascript_space_before_catch_keyword = true 682 | ij_javascript_space_before_catch_left_brace = true 683 | ij_javascript_space_before_catch_parentheses = true 684 | ij_javascript_space_before_class_lbrace = true 685 | ij_javascript_space_before_class_left_brace = true 686 | ij_javascript_space_before_colon = true 687 | ij_javascript_space_before_comma = false 688 | ij_javascript_space_before_do_left_brace = true 689 | ij_javascript_space_before_else_keyword = true 690 | ij_javascript_space_before_else_left_brace = true 691 | ij_javascript_space_before_finally_keyword = true 692 | ij_javascript_space_before_finally_left_brace = true 693 | ij_javascript_space_before_for_left_brace = true 694 | ij_javascript_space_before_for_parentheses = true 695 | ij_javascript_space_before_for_semicolon = false 696 | ij_javascript_space_before_function_left_parenth = true 697 | ij_javascript_space_before_generator_mult = false 698 | ij_javascript_space_before_if_left_brace = true 699 | ij_javascript_space_before_if_parentheses = true 700 | ij_javascript_space_before_method_call_parentheses = false 701 | ij_javascript_space_before_method_left_brace = true 702 | ij_javascript_space_before_method_parentheses = false 703 | ij_javascript_space_before_property_colon = false 704 | ij_javascript_space_before_quest = true 705 | ij_javascript_space_before_switch_left_brace = true 706 | ij_javascript_space_before_switch_parentheses = true 707 | ij_javascript_space_before_try_left_brace = true 708 | ij_javascript_space_before_type_colon = false 709 | ij_javascript_space_before_unary_not = false 710 | ij_javascript_space_before_while_keyword = true 711 | ij_javascript_space_before_while_left_brace = true 712 | ij_javascript_space_before_while_parentheses = true 713 | ij_javascript_spaces_around_additive_operators = true 714 | ij_javascript_spaces_around_arrow_function_operator = true 715 | ij_javascript_spaces_around_assignment_operators = true 716 | ij_javascript_spaces_around_bitwise_operators = true 717 | ij_javascript_spaces_around_equality_operators = true 718 | ij_javascript_spaces_around_logical_operators = true 719 | ij_javascript_spaces_around_multiplicative_operators = true 720 | ij_javascript_spaces_around_relational_operators = true 721 | ij_javascript_spaces_around_shift_operators = true 722 | ij_javascript_spaces_around_unary_operator = false 723 | ij_javascript_spaces_within_array_initializer_brackets = false 724 | ij_javascript_spaces_within_brackets = false 725 | ij_javascript_spaces_within_catch_parentheses = false 726 | ij_javascript_spaces_within_for_parentheses = false 727 | ij_javascript_spaces_within_if_parentheses = false 728 | ij_javascript_spaces_within_imports = false 729 | ij_javascript_spaces_within_interpolation_expressions = false 730 | ij_javascript_spaces_within_method_call_parentheses = false 731 | ij_javascript_spaces_within_method_parentheses = false 732 | ij_javascript_spaces_within_object_literal_braces = false 733 | ij_javascript_spaces_within_object_type_braces = true 734 | ij_javascript_spaces_within_parentheses = false 735 | ij_javascript_spaces_within_switch_parentheses = false 736 | ij_javascript_spaces_within_type_assertion = false 737 | ij_javascript_spaces_within_union_types = true 738 | ij_javascript_spaces_within_while_parentheses = false 739 | ij_javascript_special_else_if_treatment = true 740 | ij_javascript_ternary_operation_signs_on_next_line = true 741 | ij_javascript_ternary_operation_wrap = normal 742 | ij_javascript_union_types_wrap = on_every_item 743 | ij_javascript_use_chained_calls_group_indents = true 744 | ij_javascript_use_double_quotes = false 745 | ij_javascript_use_explicit_js_extension = global 746 | ij_javascript_use_path_mapping = always 747 | ij_javascript_use_public_modifier = false 748 | ij_javascript_use_semicolon_after_statement = true 749 | ij_javascript_var_declaration_wrap = normal 750 | ij_javascript_while_brace_force = always 751 | ij_javascript_while_on_new_line = false 752 | ij_javascript_wrap_comments = false 753 | 754 | [{*.kt, *.kts}] 755 | ij_kotlin_align_in_columns_case_branch = false 756 | ij_kotlin_align_multiline_binary_operation = false 757 | ij_kotlin_align_multiline_extends_list = false 758 | ij_kotlin_align_multiline_method_parentheses = false 759 | ij_kotlin_align_multiline_parameters = true 760 | ij_kotlin_align_multiline_parameters_in_calls = true 761 | ij_kotlin_assignment_wrap = off 762 | ij_kotlin_blank_lines_after_class_header = 0 763 | ij_kotlin_blank_lines_around_block_when_branches = 0 764 | ij_kotlin_block_comment_at_first_column = true 765 | ij_kotlin_call_parameters_new_line_after_left_paren = false 766 | ij_kotlin_call_parameters_right_paren_on_new_line = false 767 | ij_kotlin_call_parameters_wrap = off 768 | ij_kotlin_catch_on_new_line = false 769 | ij_kotlin_class_annotation_wrap = split_into_lines 770 | ij_kotlin_continuation_indent_for_chained_calls = true 771 | ij_kotlin_continuation_indent_for_expression_bodies = true 772 | ij_kotlin_continuation_indent_in_argument_lists = true 773 | ij_kotlin_continuation_indent_in_elvis = true 774 | ij_kotlin_continuation_indent_in_if_conditions = true 775 | ij_kotlin_continuation_indent_in_parameter_lists = true 776 | ij_kotlin_continuation_indent_in_supertype_lists = true 777 | ij_kotlin_else_on_new_line = false 778 | ij_kotlin_enum_constants_wrap = off 779 | ij_kotlin_extends_list_wrap = off 780 | ij_kotlin_field_annotation_wrap = split_into_lines 781 | ij_kotlin_finally_on_new_line = false 782 | ij_kotlin_if_rparen_on_new_line = false 783 | ij_kotlin_import_nested_classes = false 784 | ij_kotlin_insert_whitespaces_in_simple_one_line_method = true 785 | ij_kotlin_keep_blank_lines_before_right_brace = 2 786 | ij_kotlin_keep_blank_lines_in_code = 2 787 | ij_kotlin_keep_blank_lines_in_declarations = 2 788 | ij_kotlin_keep_first_column_comment = true 789 | ij_kotlin_keep_indents_on_empty_lines = false 790 | ij_kotlin_keep_line_breaks = true 791 | ij_kotlin_lbrace_on_next_line = false 792 | ij_kotlin_line_comment_add_space = false 793 | ij_kotlin_line_comment_at_first_column = true 794 | ij_kotlin_method_annotation_wrap = split_into_lines 795 | ij_kotlin_method_call_chain_wrap = off 796 | ij_kotlin_method_parameters_new_line_after_left_paren = false 797 | ij_kotlin_method_parameters_right_paren_on_new_line = false 798 | ij_kotlin_method_parameters_wrap = off 799 | ij_kotlin_name_count_to_use_star_import = 2147483647 800 | ij_kotlin_name_count_to_use_star_import_for_members = 2147483647 801 | ij_kotlin_parameter_annotation_wrap = off 802 | ij_kotlin_space_after_comma = true 803 | ij_kotlin_space_after_extend_colon = true 804 | ij_kotlin_space_after_type_colon = true 805 | ij_kotlin_space_before_catch_parentheses = true 806 | ij_kotlin_space_before_comma = false 807 | ij_kotlin_space_before_extend_colon = true 808 | ij_kotlin_space_before_for_parentheses = true 809 | ij_kotlin_space_before_if_parentheses = true 810 | ij_kotlin_space_before_lambda_arrow = true 811 | ij_kotlin_space_before_type_colon = false 812 | ij_kotlin_space_before_when_parentheses = true 813 | ij_kotlin_space_before_while_parentheses = true 814 | ij_kotlin_spaces_around_additive_operators = true 815 | ij_kotlin_spaces_around_assignment_operators = true 816 | ij_kotlin_spaces_around_equality_operators = true 817 | ij_kotlin_spaces_around_function_type_arrow = true 818 | ij_kotlin_spaces_around_logical_operators = true 819 | ij_kotlin_spaces_around_multiplicative_operators = true 820 | ij_kotlin_spaces_around_range = false 821 | ij_kotlin_spaces_around_relational_operators = true 822 | ij_kotlin_spaces_around_unary_operator = false 823 | ij_kotlin_spaces_around_when_arrow = true 824 | ij_kotlin_variable_annotation_wrap = off 825 | ij_kotlin_while_on_new_line = false 826 | ij_kotlin_wrap_elvis_expressions = 1 827 | ij_kotlin_wrap_expression_body_functions = 0 828 | ij_kotlin_wrap_first_method_in_call_chain = false 829 | 830 | [{*.shtm, *.sht, *.shtml, *.htm, *.html}] 831 | ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3 832 | ij_html_align_attributes = true 833 | ij_html_align_text = false 834 | ij_html_attribute_wrap = normal 835 | ij_html_block_comment_at_first_column = true 836 | ij_html_do_not_align_children_of_min_lines = 0 837 | ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p 838 | ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot 839 | ij_html_enforce_quotes = false 840 | ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var 841 | ij_html_keep_blank_lines = 2 842 | ij_html_keep_indents_on_empty_lines = false 843 | ij_html_keep_line_breaks = true 844 | ij_html_keep_line_breaks_in_text = true 845 | ij_html_keep_whitespaces = false 846 | ij_html_keep_whitespaces_inside = span, pre, textarea 847 | ij_html_line_comment_at_first_column = true 848 | ij_html_new_line_after_last_attribute = never 849 | ij_html_new_line_before_first_attribute = never 850 | ij_html_quote_style = double 851 | ij_html_remove_new_line_before_tags = br 852 | ij_html_space_after_tag_name = false 853 | ij_html_space_around_equality_in_attribute = false 854 | ij_html_space_inside_empty_tag = false 855 | ij_html_text_wrap = normal 856 | 857 | [{*.yml, *.yaml}] 858 | indent_size = 2 859 | ij_continuation_indent_size = 4 860 | ij_yaml_keep_indents_on_empty_lines = false 861 | ij_yaml_keep_line_breaks = true 862 | 863 | [{*.zsh, *.bash, *.sh}] 864 | ij_shell_binary_ops_start_line = false 865 | ij_shell_keep_column_alignment_padding = false 866 | ij_shell_minify_program = false 867 | ij_shell_redirect_followed_by_space = false 868 | ij_shell_switch_cases_indented = false 869 | 870 | [{.eslintrc, .babelrc, .stylelintrc, jest.config, *.json, *.jsb3, *.jsb2, *.bowerrc}] 871 | ij_json_keep_blank_lines_in_code = 0 872 | ij_json_keep_indents_on_empty_lines = false 873 | ij_json_keep_line_breaks = true 874 | ij_json_space_after_colon = true 875 | ij_json_space_after_comma = true 876 | ij_json_space_before_colon = true 877 | ij_json_space_before_comma = false 878 | ij_json_spaces_within_braces = false 879 | ij_json_spaces_within_brackets = false 880 | ij_json_wrap_long_lines = false 881 | --------------------------------------------------------------------------------