Skip to content
No description, website, or topics provided.
Kotlin
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
png
.gitignore
LICENSE
readme.md

readme.md

Gradle Enterprise Example

enterprise.gradle.kts provides rich metadata for builds published to gradle enterprise.

settings.gradle.kts uses apply(from = "enterprise.gradle.kts") to configure Gradle Enterprise.

default-custom-user-data.gradle has been converted to Kotlin (with non-Jenkins CI removed).

Testing

  • Run export JENKINS_URL=true so gradle thinks we're running on Jenkins. By default, the script will publish only on CI.
  • ./gradlew clean will produce a build scan.

Jenkins integration

  • Credentials then click System. Add a Global credential.
  • Kind: Secret Text. Set text using the domain=accesskey format
  • Specify an id. gradle-enterprise

Update the Jenkinsfile with

environment {
    GRADLE_ENTERPRISE_ACCESS_KEY = credentials('gradle-enterprise')
}

Research

Detecting IntelliJ vs Android Studio

Android Studio:

  • idea.executable=studio
  • idea.paths.selector=AndroidStudioPreview4.1
  • idea.platform.prefix=AndroidStudio

IntelliJ Community:

  • idea.executable=idea
  • idea.paths.selector=IdeaIC2019.3

Dump system properties:

var props = System.getProperties()
val writer = java.io.FileWriter(file("community.properties"))
writer.use { writer ->
    props.store(writer, "")
    writer.flush()
}
You can’t perform that action at this time.