Skip to content

Commit

Permalink
Revert prefixing local groups with "com.jetbrains.localhost-only" bec…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderBartash committed Oct 8, 2024
1 parent 3e01a1a commit cfd2cdb
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### Changed

- Improved build performance by pre-creating Ivy XML files in the extracted IDE location.
- Improved build performance by making the local Ivy repository first in the list and prefixing all "fake" artifact groups with "com.jetbrains.localhost-only" and excluding that group from already declared remote repositories.
- Improved build performance by making the local Ivy repository first in the list and making it an exclusive Gradle repository.

### Fixed

Expand Down
1 change: 0 additions & 1 deletion api/IntelliJPlatformGradlePlugin.api
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public final class org/jetbrains/intellij/platform/gradle/Constants$Configuratio
public static final field BUNDLED_MODULE_GROUP Ljava/lang/String;
public static final field BUNDLED_PLUGIN_GROUP Ljava/lang/String;
public static final field INSTANCE Lorg/jetbrains/intellij/platform/gradle/Constants$Configurations$Dependencies;
public static final field JB_LOCAL_PREFIX Ljava/lang/String;
public static final field LOCAL_IDE_GROUP Ljava/lang/String;
public static final field LOCAL_JETBRAINS_RUNTIME_GROUP Ljava/lang/String;
public static final field LOCAL_PLUGIN_GROUP Ljava/lang/String;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ buildscript {
lockAllConfigurations()
lockFile = file("gradle/locks/root/gradle-buildscript.lockfile")
lockMode.set(LockMode.DEFAULT)
//ignoredDependencies.add("com.jetbrains.localhost-only.bundledModule:*")
//ignoredDependencies.add("com.jetbrains.localhost-only.bundledPlugin:*")
//ignoredDependencies.add("bundledModule:*")
//ignoredDependencies.add("bundledPlugin:*")
}
}
// https://docs.gradle.org/current/userguide/dependency_locking.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ buildscript {
lockAllConfigurations()
lockFile = file("gradle/locks/root/gradle-buildscript.lockfile")
lockMode.set(LockMode.DEFAULT)
//ignoredDependencies.add("com.jetbrains.localhost-only.bundledModule:*")
//ignoredDependencies.add("com.jetbrains.localhost-only.bundledPlugin:*")
//ignoredDependencies.add("bundledModule:*")
//ignoredDependencies.add("bundledPlugin:*")
}
}
// https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/1778
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<key-server uri="https://keys.openpgp.org/"/>
</key-servers>
<trusted-artifacts>
<trust group="com.jetbrains.localhost-only.bundledModule" reason="Testing"/>
<trust group="com.jetbrains.localhost-only.bundledPlugin" reason="Testing"/>
<trust group="bundledModule" reason="Testing"/>
<trust group="bundledPlugin" reason="Testing"/>
</trusted-artifacts>
</configuration>
</verification-metadata>
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,11 @@ object Constants {
}

object Dependencies {
/** This group does not exist in any public repository, it is just a prefix for our local repo. */
const val JB_LOCAL_PREFIX = "com.jetbrains.localhost-only"
const val LOCAL_IDE_GROUP = "$JB_LOCAL_PREFIX.ide"
const val LOCAL_PLUGIN_GROUP = "$JB_LOCAL_PREFIX.plugin"
const val LOCAL_JETBRAINS_RUNTIME_GROUP = "$JB_LOCAL_PREFIX.jetBrainsRuntime"
const val BUNDLED_MODULE_GROUP = "$JB_LOCAL_PREFIX.bundledModule"
const val BUNDLED_PLUGIN_GROUP = "$JB_LOCAL_PREFIX.bundledPlugin"
const val LOCAL_IDE_GROUP = "localIde"
const val LOCAL_PLUGIN_GROUP = "localPlugin"
const val LOCAL_JETBRAINS_RUNTIME_GROUP = "localJetBrainsRuntime"
const val BUNDLED_MODULE_GROUP = "bundledModule"
const val BUNDLED_PLUGIN_GROUP = "bundledPlugin"
const val MARKETPLACE_GROUP = "com.jetbrains.plugins"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ class IntelliJPlatformDependenciesHelper(
}
}

// It would be better to make it createExclusiveIvyRepository.
// However, since we are creating it lazily, by this time some already registered repositories could have been
// "used". That creates an error, because an exclusive repository tries to add constraints on already existing
// repositories, which is not allowed for "used". To make it exclusive, it should be created with empty artifact
// & ivy paths in
// org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformRepositoriesExtension.defaultRepositories
// then the paths should be updated here once they are known.
IntelliJPlatformRepositoriesHelper.createIvyArtifactRepository(
repositoryName,
repositories,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class IntelliJPlatformRepositoriesHelper(
//
// - Artifact name may also come up in Gradle errors, e.g. if for some reason the artifact is not
// resolved. In that case the artifact coordinates may look very weird like:
// com.jetbrains.localhost-only.bundledPlugin:/some/path/more/path/some.jar:123.456.789
// bundledPlugin:/some/path/more/path/some.jar:123.456.789
// For the same reason file extension is also stored in "ext".
//
// - "artifact" (IvyModule#name) is mandatory and contains the second part of the path, which is file
Expand Down

0 comments on commit cfd2cdb

Please sign in to comment.