content-atom-model-scala

Java library built from Content-atom thrift definition

License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.gu
ArtifactId

ArtifactId

content-atom-model-scala_2.11
Last Version

Last Version

0.2.2
Release Date

Release Date

Type

Type

jar
Description

Description

content-atom-model-scala
Java library built from Content-atom thrift definition
Project URL

Project URL

https://github.com/guardian/content-atom
Project Organization

Project Organization

com.gu
Source Code Management

Source Code Management

https://github.com/guardian/content-atom

Download content-atom-model-scala_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.gu/content-atom-model-scala_2.11/ -->
<dependency>
    <groupId>com.gu</groupId>
    <artifactId>content-atom-model-scala_2.11</artifactId>
    <version>0.2.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.gu/content-atom-model-scala_2.11/
implementation 'com.gu:content-atom-model-scala_2.11:0.2.2'
// https://jarcasting.com/artifacts/com.gu/content-atom-model-scala_2.11/
implementation ("com.gu:content-atom-model-scala_2.11:0.2.2")
'com.gu:content-atom-model-scala_2.11:jar:0.2.2'
<dependency org="com.gu" name="content-atom-model-scala_2.11" rev="0.2.2">
  <artifact name="content-atom-model-scala_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gu', module='content-atom-model-scala_2.11', version='0.2.2')
)
libraryDependencies += "com.gu" % "content-atom-model-scala_2.11" % "0.2.2"
[com.gu/content-atom-model-scala_2.11 "0.2.2"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.7
org.apache.thrift : libthrift jar 0.9.2
com.twitter : scrooge-core_2.11 jar 3.17.0

Project Modules

There are no modules declared in this project.

Content Atom Model Definition

This is the Thrift definition of the Content Atom model, and the published versions of this repository are built from the autogenerated code in various languages.

Maven Central

Adding a new atom type

In order for the scala code generated from the thrift definitions to be packaged correctly a scala namespace needs to be included. For example for the chart atom this would be: #@namespace scala com.gu.contentatom.thrift.atom.chart

How to release

Prior to releasing, you will need to ensure that:

  • tsc is installed on your machine (e.g. brew install typescript)
  • npm is installed on your machine
  • you have an NPM account which is part of the @guardian org
  • you have configured an NPM access token to publish to @guardian; a convenient way to set this up is to execute npm login locally and follow the prompts; this will create/append to an ~/.npmrc file with the sufficient config
  • you have the followed the guide for publishing to Maven and Sonatype

To release to Maven Central:

release cross

This will release 3 artifacts:

  • content-atom-model-thrift-$version.jar contains only the Thrift files
  • content-atom-model_2.13-$version.jar contains the Thrift files and Scrooge-generated Scala 2.13 classes
  • content-atom-model_2.12-$version.jar contains the Thrift files and Scrooge-generated Scala 2.12 classes
  • content-atom-model_2.11-$version.jar contains the Thrift files and Scrooge-generated Scala 2.11 classes

To release to NPM:

project typescriptClasses
releaseNpm <version released to Maven>

To cross release locally use

$ sbt '+publishLocal'
com.gu

The Guardian

The source code of the world's leading liberal voice

Versions

Version
0.2.2
0.2.1