-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Gradle extractor 5 in Gradle >= 6.8.1
- Loading branch information
Showing
29 changed files
with
1,296 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin | ||
import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask | ||
|
||
initscript { | ||
dependencies { | ||
classpath fileTree('${pluginLibDir}') | ||
} | ||
} | ||
|
||
addListener(new BuildInfoPluginListener()) | ||
|
||
class BuildInfoPluginListener extends BuildAdapter { | ||
|
||
def void projectsLoaded(Gradle gradle) { | ||
Map<String, String> projectProperties = new HashMap<String, String>(gradle.startParameter.getProjectProperties()) | ||
projectProperties.put("build.start", Long.toString(System.currentTimeMillis())) | ||
gradle.startParameter.setProjectProperties(projectProperties) | ||
Project root = gradle.getRootProject() | ||
root.logger.debug("Artifactory plugin: projectsEvaluated: ${root.name}") | ||
if (!"buildSrc".equals(root.name)) { | ||
root.allprojects { | ||
apply { | ||
apply plugin: ArtifactoryPlugin | ||
} | ||
} | ||
} | ||
|
||
// Set the "mavenJava" and "ivyJava" publications or | ||
// "archives" configuration to all Artifactory tasks. | ||
for (Project p : root.getAllprojects()) { | ||
Task t = p.getTasks().findByName(ArtifactoryTask.ARTIFACTORY_PUBLISH_TASK_NAME) | ||
if (t != null) { | ||
ArtifactoryTask task = (ArtifactoryTask) t | ||
task.setCiServerBuild() | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.