Skip to content

Commit

Permalink
20118: [Build] Enabled Nexus repository for IntelliJ plugin, Jenkins …
Browse files Browse the repository at this point in the history
…plugin and Java projects (TICS Viewer, etc.).

We are now running an instance of Nexus at https://artifacts.tiobe.com. It includes mirrors for the following Maven repositories:
- Maven central (used for all kinds of Java libraries)
- Gradle plugins
- IntelliJ
- Jenkins

In addition to this, the following websites are mirrored as raw repositories:
- Gradle distributions (used for downloading versions of Gradle via the wrapper)
- IntelliJ JDK (used to obtain JDK versions to run IntelliJ)

This will mean the following:
- We should no longer be dependent on external sources for these builds; if a repository is (temporarily) unavailable, it won't break any builds
- When performing a build outside of TIOBE, it may fail due to https://artifacts.tiobe.com being unavailable; in that case, refer to the respective build file for a workaround
- Within the TIOBE offices, obtaining external artifacts should be drastically faster

Reviewed by @reniers.
  • Loading branch information
steneker committed May 29, 2020
1 parent 888f318 commit e2f7791
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 10 deletions.
41 changes: 32 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
plugins {
id "org.jetbrains.intellij" version "0.4.9"
id "org.jetbrains.intellij" version "0.4.9"
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

intellij {
version '2018.1.8'
version '2018.1.8'

// Specifying these custom repositories enables us to cache them within TIOBE.
// If this causes trouble, either make sure you are in the TIOBE network, or
// comment out these lines temporarily.
intellijRepo 'http://artifacts.tiobe.com/repository/maven/'
pluginsRepo 'http://artifacts.tiobe.com/repository/maven/'
jreRepo 'http://artifacts.tiobe.com/repository/intellij-jdk/'
}

patchPluginXml {
if (!project.hasProperty('SVNVERSION')) {
ext.SVNVERSION = '?'
}
sinceBuild = '172.4155'
untilBuild = '201.*'
version "${new File('../../make/TICSVERSION').text.trim()}.${SVNVERSION}"
if (!project.hasProperty('SVNVERSION')) {
ext.SVNVERSION = '?'
}
sinceBuild = '172.4155'
untilBuild = '201.*'
version "${new File('../../make/TICSVERSION').text.trim()}.${SVNVERSION}"
}

repositories {
mavenCentral()
// Specifying this custom repository enables us to cache external libraries within TIOBE.
// If this causes trouble, either make sure you are in the TIOBE network, or
// add the repository mavenCentral().
maven {
url 'http://artifacts.tiobe.com/repository/maven/'
}
//mavenCentral()
}

apply plugin: 'org.jetbrains.intellij'
Expand All @@ -31,3 +44,13 @@ jacocoTestReport {
xml.enabled true
}
}

task configureWrapper {
// Make sure that when upgrading the Gradle wrapper, we still use the local
// TIOBE mirror.
doLast {
wrapper.distributionUrl = "https://artifacts.tiobe.com/repository/gradle-distributions/gradle-${wrapper.gradleVersion}-bin.zip"
}
}

wrapper.dependsOn configureWrapper
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
distributionUrl=https\://artifacts.tiobe.com/repository/gradle-distributions/gradle-5.6.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 11 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
pluginManagement {
repositories {
// Specifying this custom repository enables us to cache Gradle plugins within TIOBE.
// If this causes trouble, either make sure you are in the TIOBE network, or
// comment out these lines temporarily.
maven {
url 'http://artifacts.tiobe.com/repository/maven/'
}
}
}

rootProject.name = 'TICSIntelliJ'

0 comments on commit e2f7791

Please sign in to comment.