forked from adamw/xsbt-proguard-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into pbrant-master
- Loading branch information
Showing
10 changed files
with
96 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
if [[ ! $1 ]]; then | ||
echo "Please provide artifact version" | ||
else | ||
VERSION=$1 | ||
TARGET=target/scala-2.9.1/sbt-0.11.0/xsbt-proguard-plugin_2.9.1-0.11.0- | ||
POM=${TARGET}${VERSION}.pom | ||
|
||
stty -echo | ||
read -p "GPG passphrase: " passw; echo | ||
stty echo | ||
|
||
function mvn-gpg { | ||
if [[ $2 ]]; then | ||
CLASSIFIER=-Dclassifier=$2 | ||
fi | ||
mvn gpg:sign-and-deploy-file -Dgpg.passphrase=$passw -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=${POM} -Dfile=${TARGET}${VERSION}$1 $CLASSIFIER | ||
} | ||
|
||
mvn-gpg .jar | ||
mvn-gpg -sources.jar sources | ||
mvn-gpg -javadoc.jar javadoc | ||
fi |
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,62 @@ | ||
import sbt._ | ||
import ScriptedPlugin._ | ||
import Keys._ | ||
|
||
import scala.xml.{Elem, Node} | ||
|
||
object ProguardPlugin extends Build { | ||
def pomPostProcessTask(node: Node) = node match { | ||
case xml: Elem => | ||
val children = Seq( | ||
<url>http://github.com/siasia/xsbt-web-plugin</url>, | ||
<licenses> | ||
<license> | ||
<name>GPLv2</name> | ||
<url>http://www.gnu.org/licenses/gpl-2.0.html</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses>, | ||
<scm> | ||
<connection>scm:git:git@github.com:siasia/xsbt-proguard-plugin.git</connection> | ||
<developerConnection>scm:git:git@github.com:siasia/xsbt-proguard-plugin.git</developerConnection> | ||
<url>git@github.com:siasia/xsbt-proguard-plugin.git</url> | ||
</scm>, | ||
<developers> | ||
<developer> | ||
<id>siasia</id> | ||
<name>Artyom Olshevskiy</name> | ||
<email>siasiamail@gmail.com</email> | ||
</developer> | ||
</developers>, | ||
<parent> | ||
<groupId>org.sonatype.oss</groupId> | ||
<artifactId>oss-parent</artifactId> | ||
<version>7</version> | ||
</parent> | ||
) | ||
xml.copy(child = xml.child ++ children) | ||
} | ||
def rootSettings: Seq[Setting[_]] = Seq( | ||
scriptedBufferLog := false, | ||
sbtPlugin := true, | ||
projectID <<= (organization,moduleName,version,artifacts,crossPaths){ (org,module,version,as,crossEnabled) => | ||
ModuleID(org, module, version).cross(crossEnabled).artifacts(as : _*) | ||
}, | ||
name := "xsbt-proguard-plugin", | ||
organization := "com.github.siasia", | ||
version <<= sbtVersion(_ + "-0.1.1"), | ||
libraryDependencies += "net.sf.proguard" % "proguard-base" % "4.6", | ||
scalacOptions += "-deprecation", | ||
publishMavenStyle := true, | ||
publishTo <<= (version) { | ||
version: String => | ||
val ossSonatype = "https://oss.sonatype.org/" | ||
if (version.trim.endsWith("SNAPSHOT")) | ||
Some("snapshots" at ossSonatype + "content/repositories/snapshots") | ||
else None | ||
}, | ||
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"), | ||
pomIncludeRepository := ((_) => false), | ||
pomPostProcess := (pomPostProcessTask _)) | ||
lazy val root = Project("root", file(".")) settings(scriptedSettings ++ rootSettings :_*) | ||
} |
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,3 @@ | ||
resolvers += Resolver.url("Typesafe Repo", url("http://repo.typesafe.com/typesafe/ivy-releases/"))(Resolver.ivyStylePatterns) | ||
|
||
libraryDependencies <+= sbtVersion("org.scala-tools.sbt" %% "scripted-plugin" % _) |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-proguard-plugin" % (v+"-0.1.1")) |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
> ++ 2.8.1 | ||
> proguard | ||
$ exists target/scala-2.8.1.final/default_2.8.1-0.1.min.jar | ||
$ exists target/scala-2.8.1/default_2.8.1-0.1.min.jar |