Skip to content

bootstraponline/gradle_enterprise_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()
}

Example

compileOnly("com.gradle:gradle-enterprise-gradle-plugin:${gradleEnterprisePluginVersion}")

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages