Created
December 7, 2021 21:11
-
-
Save jmini/e92186035950f6ee21070a6029d35cb6 to your computer and use it in GitHub Desktop.
Maven file to download some Gradle dependencies
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>mvntmp</groupId> | |
<artifactId>mvntmp</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<repositories> | |
<repository> | |
<snapshots> | |
<enabled>false</enabled> | |
</snapshots> | |
<id>central</id> | |
<url>https://repo1.maven.org/maven2/</url> | |
</repository> | |
<repository> | |
<snapshots> | |
<enabled>false</enabled> | |
</snapshots> | |
<id>gradle-plugins</id> | |
<url>https://plugins.gradle.org/m2/</url> | |
</repository> | |
</repositories> | |
<dependencies> | |
<!-- The gralde plugin [ id("org.jetbrains.kotlin.jvm") version "1.5.31" ] --> | |
<dependency> | |
<groupId>org.jetbrains.kotlin.jvm</groupId> | |
<artifactId>org.jetbrains.kotlin.jvm.gradle.plugin</artifactId> | |
<version>1.5.31</version> | |
<type>pom</type> | |
</dependency> | |
<!-- Dependencies to run the plugin --> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-scripting-compiler-embeddable</artifactId> | |
<version>1.5.31</version> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-stdlib-jdk7</artifactId> | |
<version>1.5.0</version> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-stdlib-jdk8</artifactId> | |
<version>1.5.0</version> | |
</dependency> | |
<!-- Dependencies required when compiling the 'lib' project --> | |
<dependency> | |
<groupId>org.apache.commons</groupId> | |
<artifactId>commons-math3</artifactId> | |
<version>3.6.1</version> | |
</dependency> | |
<dependency> | |
<groupId>com.google.guava</groupId> | |
<artifactId>guava</artifactId> | |
<version>30.1.1-jre</version> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-bom</artifactId> | |
<version>1.5.31</version> | |
<type>pom</type> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-stdlib-jdk7</artifactId> | |
<version>1.5.31</version> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-stdlib-jdk8</artifactId> | |
<version>1.5.31</version> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-reflect</artifactId> | |
<version>1.5.31</version> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-test</artifactId> | |
<version>1.5.31</version> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-test</artifactId> | |
<version>1.5.31</version> | |
<type>module</type><!-- force maven to download the gradle metadata for this dependency --> | |
</dependency> | |
<dependency> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-test-junit</artifactId> | |
<version>1.5.31</version> | |
</dependency> | |
</dependencies> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This POM file can be used to collect all the dependencies needed to build a gradle project created with
gradle init
, selecting a simple library written in Kotlin using the Gradle Kotlin DSL.Run it with:
Maven will download everything
Then you can use the local maven repository to build your Gradle project.
Approach discussed in https://stackoverflow.com/a/70267034