Skip to content

Commit 670035f

Browse files
Mill sonatype central publishing doc (#4928)
This PR is to close #4754 --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 82308ac commit 670035f

File tree

20 files changed

+267
-19
lines changed

20 files changed

+267
-19
lines changed

contrib/package.mill

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,11 @@ object `package` extends mill.Module {
206206
def mvnDeps = Agg(build.Deps.requests)
207207
}
208208

209-
object sonatypecentral extends ContribModule {
209+
object versionfile extends ContribModule {
210210
def compileModuleDeps = Seq(build.libs.scalalib)
211-
def mvnDeps = Agg(build.Deps.sonatypeCentralClient)
212211
}
213212

214-
object versionfile extends ContribModule {
213+
object sonatypecentral extends ContribModule {
215214
def compileModuleDeps = Seq(build.libs.scalalib)
216215
}
217216

contrib/sonatypecentral/readme.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= Sonatype Central
1+
= Sonatype Central (Plugin Moved to Scalalib)
22
:page-aliases: Plugin_Sonatype_Central.adoc
33

44
This plugin allows users to publish open-source packages to Maven Central via the Sonatype Central portal.

contrib/sonatypecentral/src/mill/contrib/sonatypecentral/package.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//// SNIPPET:BUILD
2+
package build
3+
4+
import mill._, javalib._, publish._
5+
6+
import mill.scalalib.SonatypeCentralPublishModule
7+
8+
object foo extends JavaModule with SonatypeCentralPublishModule {
9+
def scalaVersion = "2.13.8"
10+
def publishVersion = "0.0.1"
11+
12+
def pomSettings = PomSettings(
13+
description = "Hello",
14+
organization = "com.lihaoyi",
15+
url = "https://github.com/lihaoyi/example",
16+
licenses = Seq(License.MIT),
17+
versionControl = VersionControl.github("lihaoyi", "example"),
18+
developers = Seq(Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi"))
19+
)
20+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package foo;
2+
3+
public class Foo {
4+
public static void main(String[] args) {
5+
System.out.println("Hello World");
6+
}
7+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//// SNIPPET:BUILD
2+
package build
3+
4+
import mill._, kotlinlib._, publish._
5+
6+
import mill.scalalib.SonatypeCentralPublishModule
7+
8+
object foo extends KotlinModule with SonatypeCentralPublishModule {
9+
def scalaVersion = "2.13.8"
10+
def publishVersion = "0.0.1"
11+
12+
def pomSettings = PomSettings(
13+
description = "Hello",
14+
organization = "com.lihaoyi",
15+
url = "https://github.com/lihaoyi/example",
16+
licenses = Seq(License.MIT),
17+
versionControl = VersionControl.github("lihaoyi", "example"),
18+
developers = Seq(Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi"))
19+
)
20+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package foo
2+
3+
fun main(args: Array<String>) = println("Hello World")
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//// SNIPPET:BUILD
2+
package build
3+
import mill._, scalalib._, publish._
4+
5+
object foo extends ScalaModule with SonatypeCentralPublishModule {
6+
def scalaVersion = "2.13.8"
7+
def publishVersion = "0.0.1"
8+
9+
def pomSettings = PomSettings(
10+
description = "Hello",
11+
organization = "com.lihaoyi",
12+
url = "https://github.com/lihaoyi/example",
13+
licenses = Seq(License.MIT),
14+
versionControl = VersionControl.github("lihaoyi", "example"),
15+
developers = Seq(Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi"))
16+
)
17+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package foo
2+
object Foo {
3+
def main(args: Array[String]): Unit = {
4+
println("Hello World")
5+
}
6+
}

integration/ide/gen-idea/resources/extended/idea/mill_modules/mill-build.iml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@
105105
<orderEntry type="library" name="scalaparse_3-3.1.1.jar" level="project"/>
106106
<orderEntry type="library" name="slf4j-api-2.0.17.jar" level="project"/>
107107
<orderEntry type="library" scope="RUNTIME" name="snakeyaml-engine-2.9.jar" level="project"/>
108+
<orderEntry type="library" name="sonatype-central-client-core_3-0.3.0.jar" level="project"/>
109+
<orderEntry type="library" name="sonatype-central-client-requests_3-0.3.0.jar" level="project"/>
110+
<orderEntry type="library" name="sonatype-central-client-upickle_3-0.3.0.jar" level="project"/>
108111
<orderEntry type="library" name="sourcecode_3-0.4.3-M5.jar" level="project"/>
109112
<orderEntry type="library" name="specification-level_2.13-1.1.3.jar" level="project"/>
110113
<orderEntry type="library" name="test-interface-1.0.jar" level="project"/>

0 commit comments

Comments
 (0)