Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Change version update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianRaFo committed Aug 2, 2017
1 parent b77f1de commit 5afbd74
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 87 deletions.
123 changes: 60 additions & 63 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,75 +19,72 @@ lazy val macroid = (project in file("."))
)

lazy val core = (project in file("macroid-core"))
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(
libraryDependencies += "org.scalameta" %% "scalameta" % "1.8.0" % Provided,
macroAnnotationSettings)
.settings(
name := "macroid",
description := "A Scala GUI DSL for Android",
homepage := Some(url("http://47deg.github.io/macroid")),
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-async" % "0.9.6"),
unmanagedSourceDirectories in Test := Seq(
baseDirectory.value / "src" / "test" / "scala")
)
.settings(
platformTarget in Android := platformV,
unmanagedClasspath in Test ++= (bootClasspath in Android).value
)
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(macroSettings: _*)
.settings(
name := "macroid",
description := "A Scala GUI DSL for Android",
homepage := Some(url("http://47deg.github.io/macroid")),
platformTarget in Android := platformV,
unmanagedClasspath in Test ++= (bootClasspath in Android).value,
unmanagedSourceDirectories in Test := Seq(
baseDirectory.value / "src" / "test" / "scala"),
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-async" % "0.9.6"
)
)

lazy val viewable = (project in file("macroid-viewable"))
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(
name := "macroid-viewable",
description := "Typeclasses to turn data into Android layouts",
homepage := Some(
url("http://47deg.github.io/macroid/docs/modules/Viewable.html")),
platformTarget in Android := platformV,
unmanagedClasspath in Test ++= (bootClasspath in Android).value
)
.dependsOn(core)
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(
name := "macroid-viewable",
description := "Typeclasses to turn data into Android layouts",
platformTarget in Android := platformV,
unmanagedClasspath in Test ++= (bootClasspath in Android).value,
homepage := Some(
url("http://47deg.github.io/macroid/docs/modules/Viewable.html"))
)
.dependsOn(core)

lazy val akka = (project in file("macroid-akka"))
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(
name := "macroid-akka",
description := "Helpers to attach Akka Actors to Android Fragments",
homepage := Some(
url("http://47deg.github.io/macroid/docs/modules/Akka.html")),
platformTarget in Android := platformV,
unmanagedClasspath in Test ++= (bootClasspath in Android).value,
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.5.3"
)
.dependsOn(core)
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(
name := "macroid-akka",
description := "Helpers to attach Akka Actors to Android Fragments",
platformTarget in Android := platformV,
unmanagedClasspath in Test ++= (bootClasspath in Android).value,
homepage := Some(
url("http://47deg.github.io/macroid/docs/modules/Akka.html")),
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.5.3"
)
.dependsOn(core)

lazy val docs = (project in file("macroid-docs"))
.settings(commonSettings: _*)
.settings(micrositeSettings: _*)
.settings(moduleName := "macroid-docs")
.enablePlugins(MicrositesPlugin)
.settings(name := "docs", description := "Macroid Documentation")
.dependsOn(core)
.settings(commonSettings: _*)
.settings(micrositeSettings: _*)
.settings(moduleName := "macroid-docs")
.enablePlugins(MicrositesPlugin)
.settings(name := "docs", description := "Macroid Documentation")
.dependsOn(core)

lazy val extras = (project in file("macroid-extras"))
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(
name := "macroid-extras",
description := "Tweaks and utilities for android views",
homepage := Some(
url("http://47deg.github.io/macroid/docs/modules/Extras.html")),
platformTarget in Android := platformV,
unmanagedClasspath in Test ++= (bootClasspath in Android).value,
libraryDependencies ++= Seq(
"com.android.support" % "appcompat-v7" % androidV,
"com.android.support" % "recyclerview-v7" % androidV,
"com.android.support" % "cardview-v7" % androidV,
"com.android.support" % "design" % androidV
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(
name := "macroid-extras",
description := "Tweaks and utilities for android views",
platformTarget in Android := platformV,
unmanagedClasspath in Test ++= (bootClasspath in Android).value,
homepage := Some(
url("http://47deg.github.io/macroid/docs/modules/Extras.html")),
libraryDependencies ++= Seq(
"com.android.support" % "appcompat-v7" % androidV,
"com.android.support" % "recyclerview-v7" % androidV,
"com.android.support" % "cardview-v7" % androidV,
"com.android.support" % "design" % androidV
)
)
)
.dependsOn(core)
.dependsOn(core)
8 changes: 4 additions & 4 deletions macroid-docs/src/main/tut/docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ section: docs

# Installation

## Version `3.0.0`
## Version `2.1.0`

*Macroid* is packaged in the AAR format and published to [Maven Central](http://central.maven
.org/maven2/org/macroid/macroid_2.11/3.0.0/).
.org/maven2/org/macroid/macroid_2.11/2.1.0/).

Assuming sbt version `0.13.x` and [sbt-android](https://github.com/scala-android/sbt-android)
version `1.7.8` and above, you can add it to your project like this:

```scala
libraryDependencies ++= Seq(
aar("org.macroid" %% "macroid" % "3.0.0")
aar("org.macroid" %% "macroid" % "2.1.0")
```

If you want to use the SNAPSHOT version you need to add the Sonatype SNAPSHOT repo
Expand All @@ -26,7 +26,7 @@ resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

libraryDependencies ++= Seq(
aar("org.macroid" %% "macroid" % "3.0.0-SNAPSHOT")
aar("org.macroid" %% "macroid" % "2.1.0-SNAPSHOT")
```

## Version `2.0.0` and below
Expand Down
2 changes: 1 addition & 1 deletion macroid-docs/src/main/tut/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Striving to be focused on one thing (GUI), *Macroid* promotes composability and

Prerequisites: Scala `2.10.x` or `2.11.x`, Android `API 19+`.

Latest version: `3.0.0` ([installation](Installation.html) | [changelog](Changelog.md)).
Latest version: `2.1.0` ([installation](Installation.html) | [changelog](Changelog.md)).

* [What does it look like](Tutorial.html)
* [How is it different from...](Differences.html)
Expand Down
6 changes: 3 additions & 3 deletions macroid-docs/src/main/tut/docs/modules/Akka.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ You have to add your version of Akka yourself (see below).

## How to use

Assuming you already have *Macroid* `2.0.0-M4` installed, add this line to your `build.sbt`:
Assuming you already have *Macroid* `2.1.0` installed, add this line to your `build.sbt`:

```scala
libraryDependencies ++= Seq(
// this library
aar("org.macroid" %% "macroid-akka" % "2.0.0-M4"),
aar("org.macroid" %% "macroid-akka" % "2.1.0"),

// akka, if not included before
"com.typesafe.akka" %% "akka-actor" % "2.3.9"
"com.typesafe.akka" %% "akka-actor" % "2.5.3"
)

// Proguard rules
Expand Down
4 changes: 2 additions & 2 deletions macroid-docs/src/main/tut/docs/modules/Extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ An heterogenous collection of traits and objects. Macroid-Extras implements some

## Installation

Assuming you already have *Macroid* `2.0` installed, add this line to your `build.sbt`:
Assuming you already have *Macroid* `2.1.0` installed, add this line to your `build.sbt`:

```scala
libraryDependencies += aar("org.macroid" %% "macroid-extras" % "2.0")
libraryDependencies += aar("org.macroid" %% "macroid-extras" % "2.1.0")
```

4 changes: 2 additions & 2 deletions macroid-docs/src/main/tut/docs/modules/Viewable.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ This module provides typeclasses to convert data to Android layouts. It offers t

## Installation

Assuming you already have *Macroid* `2.0.0-M4` installed, add this line to your `build.sbt`:
Assuming you already have *Macroid* `2.1.0` installed, add this line to your `build.sbt`:

```scala
libraryDependencies += aar("org.macroid" %% "macroid-viewable" % "2.0.0-M4")
libraryDependencies += aar("org.macroid" %% "macroid-viewable" % "2.1.0")
```

## Viewable
Expand Down
30 changes: 19 additions & 11 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object ProjectPlugin extends AutoPlugin {
lazy val micrositeSettings = Seq(
micrositeName := "macroid",
micrositeDescription := "A modular functional user interface creation language for Android," +
"" + " implemented with Scala macros",
"" + " implemented with Scala macros",
micrositeBaseUrl := "macroid",
micrositeDocumentationUrl := "/macroid/docs/",
micrositeGithubOwner := "47deg",
Expand All @@ -28,9 +28,10 @@ object ProjectPlugin extends AutoPlugin {
)
val androidV = "25.0.1"
val platformV = "android-25"
val paradiseVersion = "2.1.0"

val commonSettings =Seq(
version := "3.0.0-SNAPSHOT",
version := "2.1.0-SNAPSHOT",
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
scalaVersion := "2.11.11",
crossScalaVersions := Seq("2.10.6", "2.11.11"),
Expand Down Expand Up @@ -62,7 +63,7 @@ object ProjectPlugin extends AutoPlugin {
homepage := Some(url("http://47deg.github.io/macroid")),
scmInfo := Some(
ScmInfo(url("https://github.com/47deg/macroid"),
"https://github.com/47deg/macroid.git")),
"https://github.com/47deg/macroid.git")),
pomExtra := <developers>
<developer>
<name>macroid</name>
Expand All @@ -75,20 +76,27 @@ object ProjectPlugin extends AutoPlugin {
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
sys.env.getOrElse("PUBLISH_USERNAME", ""),
sys.env.getOrElse("PUBLISH_PASSWORD", "")),
"oss.sonatype.org",
sys.env.getOrElse("PUBLISH_USERNAME", ""),
sys.env.getOrElse("PUBLISH_PASSWORD", "")),
publishArtifact in Test := false
) ++ addCommandAlias(
"testAndCover",
"; clean; coverage; test; coverageReport; coverageAggregate")

lazy val macroAnnotationSettings = Seq(
addCompilerPlugin("org.scalameta" % "paradise" % "3.0.0-M9" cross CrossVersion.full),
scalacOptions += "-Xplugin-require:macroparadise",
scalacOptions in (Compile, console) ~= (_ filterNot (_ contains "paradise")) // macroparadise plugin doesn't work in repl yet.
val macroSettings = Seq(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value, // required by macro-compat
"org.typelevel" %% "macro-compat" % "1.1.1",
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
compilerPlugin(
"org.scalamacros" % "paradise" % paradiseVersion cross CrossVersion.full)
),
libraryDependencies ++= (scalaBinaryVersion.value match {
case "2.10" => Seq("org.scalamacros" %% "quasiquotes" % paradiseVersion)
case _ Seq()
})
)

}

}
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "3.0.0-SNAPSHOT"
version in ThisBuild := "2.1.0-SNAPSHOT"

0 comments on commit 5afbd74

Please sign in to comment.