Skip to content

Commit

Permalink
Merge pull request #13 from PEJaffe/migrate-to-artifactory
Browse files Browse the repository at this point in the history
Migrate to artifactory
  • Loading branch information
gregghz authored Apr 22, 2021
2 parents 5a6122b + cffb8e9 commit 0b68f9e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,7 @@ Session.vim
tags
# End of https://www.gitignore.io/api/git,vim,macos,emacs,intellij+all

.bsp/sbt.json

target/
**/target/
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Currently only SGTIN-96 and a custom Nike display tag format (XNDT) are supporte
### SBT

``` scala
resolvers in ThisBuild += "oss-nike" at "https://dl.bintray.com/nike/maven"
resolvers in ThisBuild += "nike-oss" at "https://artifactory.nike.com/artifactory/maven"
libraryDependencies += "com.nike.epc" % "epc-core" % "1.0.0"
```

Expand All @@ -31,11 +31,11 @@ libraryDependencies += "com.nike.epc" % "epc-core" % "1.0.0"
``` groovy
repositories {
maven {
url 'https://dl.bintray.com/nike/maven'
url 'https://artifactory.nike.com/artifactory/maven'
}
}
compile group: 'com.nike.epc', name: 'epc-core', version: '1.0.0'
compile group: 'com.nike.epc', name: 'epc-core', version: '1.0.0', ext: 'pom'
```

### Maven
Expand All @@ -44,13 +44,14 @@ compile group: 'com.nike.epc', name: 'epc-core', version: '1.0.0'
<repository>
<id>nike-oss</id>
<name>Nike OSS</name>
<url>https://dl.bintray.com/nike/maven</url>
<url>https://artifactory.nike.com/artifactory/maven</url>
</repository>

<dependency>
<groupId>com.nike.epc</groupId>
<artifactId>epc-core</artifactId>
<version>1.0.0</version>
<type>pom</type>
</dependency>
```

Expand Down
25 changes: 12 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,24 @@ startYear in ThisBuild := Some(2018)
description in ThisBuild := "A library for working with standards from the EPC extension to the GS1 standard"
crossPaths in ThisBuild := false

bintrayOrganization in ThisBuild := Some("nike")
bintrayRepository in ThisBuild := "maven"
bintrayPackage in ThisBuild := "epc-standards"

version in ThisBuild := sys.env.get("TRAVIS_TAG").filter(_.trim.nonEmpty).getOrElse("0-SNAPSHOT")
publishTo in ThisBuild := {
val repo = "https://artifactory.nike.com/artifactory/maven"
if (isSnapshot.value) {
Some("snapshots" at s"$repo-snapshots")
} else {
Some("releases" at repo)
}
}
credentials in ThisBuild += Credentials(Path.userHome / ".ivy2" / ".credentials")

lazy val ci = TaskKey[Unit]("ci")

lazy val `epc-standards` = (project in file("."))
.settings(
publishArtifact := false,
ci := Def.taskDyn {
if (version.value.endsWith("-SNAPSHOT")) {
Def.task {
(`epc-core` / (jacoco in Test)).value
}
} else {
Def.task {
(`epc-core` / publish).dependsOn((`epc-core` / (jacoco in Test))).value
}
Def.task {
(`epc-core` / publish).dependsOn((`epc-core` / (jacoco in Test))).value
}
}.value
)
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.6
sbt.version=1.4.7
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resolvers += Resolver.jcenterRepo

addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.0.3")
addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.3.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
addSbtPlugin("net.aichler" % "sbt-jupiter-interface" % "0.7.0")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.4.1")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")
1 change: 1 addition & 0 deletions version.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ThisBuild / version := "1.0.2-SNAPSHOT"

0 comments on commit 0b68f9e

Please sign in to comment.