diff --git a/.gitignore b/.gitignore index 9f4d766..5d4a8fb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ proguard-sbt.txt # vim swap files *.sw* + +local.secring.asc +local.pubring.asc \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 6cc5aad..1d60793 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,11 @@ cache: - $HOME/android-sdk_r24-linux.tgz - $HOME/android-sdk-linux +env: + global: + - secure: "IySntSISKvpQjBJetgwfrFoFDTwAl2diMTpMv8yAeeOwYkpRaO8UaeuitWpK2JNb2JrfbzfvelT+pR79kyKCNzXfzvFJ1kw0NaSqSijBQo5h8PcnqpdB8W/Rr3LLE1v6isvTIAI/hqEnwOzbPkX1jJ0Zyq8gQA5vEk1iT/xpFzQ=" + - secure: "bJzXS/Uhyrfl0Hr6FE856i0EOipG/8J12Sq/HaJdLwZ1c7Ns1eNQ1trSKN7plzRuY1ybiMgp3BHvkLDZkAaxfVNgyTl+REyMXr58ns1kIP9obTcHNxz/X2DXbILpFbngmNdf1LAvBDNVFbPaDUjUF9zUY31SUspjYE3gfflcAF0=" + - secure: "WhPCWomgfcK/zMJYc5IMN82Gb2lXhCVt0XedSCAcOCsbNW/jeUN87ZleshhIuZgf/jQ6yHJ0X0Btiy4IpayrBI0n6Zg74MMnQ802etPeuBlxqQjdoBLsj0EGMxFtKrJap3mpfpmWvy8g0Mgcvxh4f3k+CPV5GCBxWOphEm9eH8Q=" before_install: - sudo apt-get update -qq - sudo apt-get install -y libc6-i386 lib32z1 lib32stdc++6 @@ -26,4 +31,10 @@ before_install: - export ANDROID_HOME=$HOME/android-sdk-linux - export ANDROID_SDK_HOME=$HOME/android-sdk-linux - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools - +- export GPG_FOLDER=$TRAVIS_BUILD_DIR +- openssl aes-256-cbc -K $encrypted_7931e7eaa203_key -iv $encrypted_7931e7eaa203_iv -in rings.tar.enc -out rings.tar -d +- tar -xvf $TRAVIS_BUILD_DIR/rings.tar -C $TRAVIS_BUILD_DIR +after_success: +- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "=all-upgrade-for-sonatype-version" && sbt ++$TRAVIS_SCALA_VERSION "project core" "publishSnapshot" +- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "=all-upgrade-for-sonatype-version" && sbt ++$TRAVIS_SCALA_VERSION "project akka" "publishSnapshot" +- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "=all-upgrade-for-sonatype-version" && sbt ++$TRAVIS_SCALA_VERSION "project viewable" "publishSnapshot" \ No newline at end of file diff --git a/README.md b/README.md index b334e3f..9605584 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ### *Macroid* β€” a Scala GUI DSL for Android -[![Build Status](https://travis-ci.org/macroid/macroid.png?branch=master)](https://travis-ci.org/macroid/macroid) [![Codacy Badge](https://www.codacy.com/project/badge/fb3d939567d04686bfb23da3a22b9de9)](https://www.codacy.com/public/nickstanch/macroid) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Macroid-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1529) [![Join the chat at https://gitter.im/macroid/macroid](https://img.shields.io/badge/GITTER-Join%20chat%20β†’-brightgreen.svg?style=flat)](https://gitter.im/macroid/macroid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](https://travis-ci.org/47deg/macroid.png?branch=master)](https://travis-ci.org/47deg/macroid) [![Codacy Badge](https://www.codacy.com/project/badge/fb3d939567d04686bfb23da3a22b9de9)](https://www.codacy.com/public/nickstanch/macroid) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Macroid-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1529) [![Join the chat at https://gitter.im/macroid/macroid](https://img.shields.io/badge/GITTER-Join%20chat%20β†’-brightgreen.svg?style=flat)](https://gitter.im/macroid/macroid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) *Macroid* is the most badass modular functional user interface creation language for Android, implemented with Scala macros. [Some people say](http://www.urbandictionary.com/define.php?term=macroid) it’s also a dead noodle. @@ -9,7 +9,7 @@ Striving to be focused on one thing (GUI), *Macroid* promotes composability and Prerequisites: Scala `2.10.x` or `2.11.x`, Android `API 9+`. -Latest version: `2.0.0-M4` ([installation](http://macroid.github.io/Installation.html) | [changelog](http://macroid.github.io/Changelog.html)). +Latest version: `2.0.0-M5` License: [MIT](http://opensource.org/licenses/MIT). @@ -20,6 +20,27 @@ License: [MIT](http://opensource.org/licenses/MIT). For more info head to http://macroid.github.io! +#### Installation + +```scala + +libraryDependencies ++= Seq( + aar("org.macroid" %% "macroid" % "2.0.0-M5") + +``` + +If you want to use the SNAPSHOT version you need to add the Sonatype SNAPSHOT repo + +```scala + +resolvers += + "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" + +libraryDependencies ++= Seq( + aar("org.macroid" %% "macroid" % "2.0.0-M6-SNAPSHOT") + +``` + #### Contributing All contributions are welcome (and encouraged)! diff --git a/build.sbt b/build.sbt index 3e92678..c32d9c5 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,17 @@ import com.typesafe.sbt.SbtScalariform.ScalariformKeys +import sbt.Keys._ import scalariform.formatter.preferences._ -val commonSettings = androidBuildAar ++ bintrayPublishSettings ++ Seq( + +lazy val gpgFolder = sys.env.getOrElse("GPG_FOLDER", ".") + +lazy val publishSnapshot = taskKey[Unit]("Publish only if the version is a SNAPSHOT") + +val commonSettings = androidBuildAar ++ Seq( platformTarget in Android := "android-23", typedResources := false, - organization := "org.macroid", - version := "2.0.0-M4", + version := "2.0.0-M6-SNAPSHOT", licenses += ("MIT", url("http://opensource.org/licenses/MIT")), scalaVersion := "2.11.7", @@ -41,7 +46,58 @@ val commonSettings = androidBuildAar ++ bintrayPublishSettings ++ Seq( .setPreference(PlaceScaladocAsterisksBeneathSecondAsterisk, true) .setPreference(DoubleIndentClassDeclaration, false) .setPreference(MultilineScaladocCommentsStartOnFirstLine, true) - .setPreference(RewriteArrowSymbols, true) + .setPreference(RewriteArrowSymbols, true), + + organization := "org.macroid", + + organizationName := "macroid", + + organizationHomepage := Some(new URL("http://macroid.github.io")), + + publishMavenStyle := true, + + startYear := Some(2015), + + description := "A Scala GUI DSL for Android", + + homepage := Some(url("http://macroid.github.io")), + + scmInfo := Some(ScmInfo(url("https://github.com/47deg/macroid"), "https://github.com/47deg/macroid.git")), + + pomExtra := + + + macroid + + , + + publishTo := { + val nexus = "https://oss.sonatype.org/" + if (isSnapshot.value) + Some("snapshots" at nexus + "content/repositories/snapshots") + else + Some("releases" at nexus + "service/local/staging/deploy/maven2") + }, + + pgpPassphrase := Some(sys.env.getOrElse("GPG_PASSPHRASE", "").toCharArray), + + pgpPublicRing := file(s"$gpgFolder/local.pubring.asc"), + + pgpSecretRing := file(s"$gpgFolder/local.secring.asc"), + + credentials += Credentials("Sonatype Nexus Repository Manager", + "oss.sonatype.org", + sys.env.getOrElse("PUBLISH_USERNAME", ""), + sys.env.getOrElse("PUBLISH_PASSWORD", "")), + + publishArtifact in Test := false, + + publishSnapshot := Def.taskDyn { + if (isSnapshot.value) Def.task { PgpKeys.publishSigned.value } + else Def.task(println("Actual version is not a Snapshot. Skipping publish.")) + }.value + + ) ++ addCommandAlias("testAndCover", "; clean; coverage; test; coverageReport; coverageAggregate") val paradiseVersion = "2.1.0" diff --git a/project/plugins.sbt b/project/plugins.sbt index a2ed132..90edae9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,8 +1,8 @@ -addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.5.16") - -addSbtPlugin("me.lessis" % "bintray-sbt" % "0.2.1") +addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.5.19") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5") addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") + diff --git a/rings.tar.enc b/rings.tar.enc new file mode 100644 index 0000000..2ab3c28 Binary files /dev/null and b/rings.tar.enc differ