Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,16 @@
</prerequisites>

<modules>
<module>sentry-json-connector</module>
<module>sentry</module>
<module>sentry-android</module>
<module>sentry-appengine</module>
<module>sentry-log4j</module>
<module>sentry-logback</module>
<module>sentry-log4j2</module>
<module>sentry-spring</module>
<module>sentry-gson-factory</module>
<module>sentry-jackson-factory</module>
</modules>

<scm>
Expand Down Expand Up @@ -119,6 +122,7 @@
<!-- dependencies versions -->
<slf4j.version>1.7.24</slf4j.version>
<jackson.version>2.8.7</jackson.version>
<gson.version>2.8.1</gson.version>
<jmockit.version>1.14</jmockit.version>
<testng.version>6.9.10</testng.version>
<hamcrest.version>1.3</hamcrest.version>
Expand All @@ -133,12 +137,34 @@
<artifactId>sentry</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sentry-json-connector</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sentry-jackson-factory</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sentry</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sentry-jackson-factory</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sentry-json-connector</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -160,6 +186,11 @@
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
Expand Down
10 changes: 10 additions & 0 deletions sentry-android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand All @@ -86,6 +91,11 @@
<artifactId>jackson-annotations</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sentry-jackson-factory</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
3 changes: 3 additions & 0 deletions sentry-gson-factory/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# sentry-gson-factory

See the [Sentry documentation](https://docs.sentry.io/clients/java/) for more information.
5 changes: 5 additions & 0 deletions sentry-gson-factory/bnd.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bundle-Name: ${project.name}
Bundle-Description: ${project.description}

-exportcontents:\
io.sentry.marshaller.json.factory
132 changes: 132 additions & 0 deletions sentry-gson-factory/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.sentry</groupId>
<artifactId>sentry-all</artifactId>
<version>1.7.6-SNAPSHOT</version>
</parent>

<artifactId>sentry-gson-factory</artifactId>
<packaging>jar</packaging>

<name>Sentry-Java Gson Connector</name>
<description>Gson Connector for Sentry-Java client.</description>

<properties>
<junit.version>4.12</junit.version>
<robolectric.version>2.4</robolectric.version>
<maven-ant.version>2.1.3</maven-ant.version>
<easymock.version>3.5</easymock.version>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sentry-json-connector</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>${easymock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.robolectric</groupId>
<artifactId>robolectric</artifactId>
<version>${robolectric.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-ant-tasks</artifactId>
<version>${maven-ant.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<scope>test</scope>
</dependency>

<!-- Integration tests dependencies -->
<!-- Sentry Test-jar does not provide test dependencies transitively -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sentry-json-connector</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<goals>
<goal>bnd-process</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Automatic-Module-Name>io.sentry.gson.factory</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.sentry.marshaller.json.factory;

import io.sentry.marshaller.json.connector.JsonFactory;
import io.sentry.marshaller.json.connector.JsonGenerator;
import io.sentry.marshaller.json.generator.GsonGenerator;

import java.io.IOException;
import java.io.OutputStream;

/**
* JsonFactory implementation for runtime Gson Injection.
*/
public class JsonFactoryImpl implements JsonFactory {

@Override
public JsonGenerator createGenerator(OutputStream destination) throws IOException {
return new GsonGenerator(destination);
}
}
Loading