Skip to content

Commit

Permalink
Merge branch 'main' into initial-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
teogor authored Mar 17, 2021
2 parents 99275b6 + 49d8e2f commit 911c6c0
Show file tree
Hide file tree
Showing 6 changed files with 307 additions and 3 deletions.
89 changes: 88 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,93 @@
# parcelled
# Parcelled - Android Library

## Intro
A fast annotation processor that auto-generates the Parcelable methods without writing them.

## Getting Started
For information on how to get started Parcelled, take a look at our [Getting Started](docs/getting-started.md) guide.

## Submitting Bugs or Feature Requests
Bugs or feature requests should be submitted at our [GitHub Issues section](https://github.com/zeoflow/parcelled/issues).

## How does it work?
### 1. Depend on our library

Parcelled for Android is available through Google's Maven Repository.
To use it:

1. Open the `build.gradle` file for your application.
2. Make sure that the `repositories` section includes Google's Maven Repository
`google()`. For example:
```groovy
allprojects {
repositories {
google()
jcenter()
}
}
```

3. Add the library to the `dependencies` section:
```groovy
dependencies {
// ...
def parcelled_version = "1.0.0"
implementation("com.zeoflow:parcelled-runtime:$parcelled_version")
annotationProcessor("com.zeoflow:parcelled-compiler:$parcelled_version")
// ...
}
```

### 2. Usage
#### 2.1 Import
```java
import com.zeoflow.parcelled.Parcelled;
import com.zeoflow.parcelled.ParcelledAdapter;
import com.zeoflow.parcelled.ParcelledVersion;
```

#### 2.2 Class Declaration
```java
@Parcelled(version = 1)
public abstract class CustomBean implements Parcelable {

@Nullable
public String firstName;

@ParcelledVersion(after = 1, before = 2)
@Nullable
public String lastName;

@ParcelledAdapter(DateTypeAdapter.class)
@ParcelledVersion(before = 1)
public Date birthday;

public static CustomBean create(
@NonNull String firstName,
@NonNull String lastName,
@NonNull Date birthday
) {
return new Parcelled_Person(firstName, lastName, birthday);
}
}
```

## License
Copyright 2020 ZeoFlow

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

## 🏆 Contributors 🏆

<!-- ZEOBOT-LIST:START - Do not remove or modify this section -->
Expand Down
102 changes: 102 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Parcelled - Android Library

## Intro
A fast annotation processor that auto-generates the Parcelable methods without writing them.

## Getting Started
For information on how to get started Parcelled, take a look at our [Getting Started](docs/getting-started.md) guide.

## Submitting Bugs or Feature Requests
Bugs or feature requests should be submitted at our [GitHub Issues section](https://github.com/zeoflow/parcelled/issues).

## How does it work?
### 1. Depend on our library

Parcelled for Android is available through Google's Maven Repository.
To use it:

1. Open the `build.gradle` file for your application.
2. Make sure that the `repositories` section includes Google's Maven Repository
`google()`. For example:
```groovy
allprojects {
repositories {
google()
jcenter()
}
}
```

3. Add the library to the `dependencies` section:
```groovy
dependencies {
// ...
def parcelled_version = "1.0.0"
implementation("com.zeoflow:parcelled-runtime:$parcelled_version")
annotationProcessor("com.zeoflow:parcelled-compiler:$parcelled_version")
// ...
}
```

### 2. Usage
#### 2.1 Import
```java
import com.zeoflow.parcelled.Parcelled;
import com.zeoflow.parcelled.ParcelledAdapter;
import com.zeoflow.parcelled.ParcelledVersion;
```

#### 2.2 Class Declaration
```java
@Parcelled(version = 1)
public abstract class CustomBean implements Parcelable {

@Nullable
public String firstName;

@ParcelledVersion(after = 1, before = 2)
@Nullable
public String lastName;

@ParcelledAdapter(DateTypeAdapter.class)
@ParcelledVersion(before = 1)
public Date birthday;

public static CustomBean create(
@NonNull String firstName,
@NonNull String lastName,
@NonNull Date birthday
) {
return new Parcelled_Person(firstName, lastName, birthday);
}
}
```

## License
Copyright 2020 ZeoFlow

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

## 🏆 Contributors 🏆

<!-- ZEOBOT-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<p float="left">
<a href="docs/contributors.md#pushpin-teodor-g-teodorhmx1"><img width="100" src="https://avatars.githubusercontent.com/u/22307006?v=4" hspace=5 title='Teodor G. (@TeodorHMX1) - click for details about the contributions'></a>
</p>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ZEOBOT-LIST:END -->
20 changes: 20 additions & 0 deletions docs/building-from-source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--docs:
title: "Building From Source"
layout: landing
section: docs
path: /docs/building-from-source/
-->

# Building From the Latest Source

If you'll be contributing to the library, or need a version newer than what has
been released, Parcelled from ZeoFlow can also be built from source.
To do so:

Clone the repository:

```sh
git clone https://github.com/zeoflow/parcelled.git
```

Then, build the library's AARs using Gradle
51 changes: 51 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!--docs:
title: "Contributing"
layout: landing
section: docs
path: /docs/contributing/
-->

# General Contributing Guidelines

The Parcelled contributing policies and procedures can be found in the
main Parcelled documentation repository’s
[contributing page](https://github.com/zeoflow/parcelled/blob/CONTRIBUTING.md).

To make a contribution, you'll need to be able to build the library from source
and run our tests.

## Building From Source

Take a look at our [instructions](building-from-source.md) on how to build the
library from source.

## Running Tests

Parcelled for Android has JVM tests as well as Emulator tests.

To run the JVM tests, do:

```sh
./gradlew test
```

To run the emulator tests, ensure you have
[a virtual device set up](https://developer.android.com/studio/run/managing-avds.html)
and do:

```sh
./gradlew connectedAndroidTest
```

## Code Conventions

Since we all want to spend more time coding and less time fiddling with
whitespace, Parcelled uses code conventions and styles to
encourage consistency. Code with a consistent style is easier (and less
error-prone!) to review, maintain, and understand.

#### Be consistent

If the style guide is not explicit about a particular situation, the cardinal
rule is to **be consistent**. For example, take a look at the surrounding code
and follow its lead, or look for similar cases elsewhere in the codebase.
3 changes: 1 addition & 2 deletions docs/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
- :bust_in_silhouette::toolbox: Maintenance



###### Contributors list generated by [` @zeobot[bot] `](https://github.com/apps/zeobot)
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ZEOBOT-LIST:END -->
<!-- ZEOBOT-LIST:END -->
45 changes: 45 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--docs:
title: "Getting Started"
layout: landing
section: docs
path: /docs/getting-started/
-->

### 1. Depend on our library

Parcelled for Android is available through Google's Maven Repository.
To use it:

1. Open the `build.gradle` file for your application.
2. Make sure that the `repositories` section includes Google's Maven Repository
`google()`. For example:

```groovy
allprojects {
repositories {
google()
jcenter()
}
}
```
3. Add the library to the `dependencies` section:
```groovy
dependencies {
// ...
def parcelled_version = "1.0.0"
implementation("com.zeoflow:parcelled-runtime:$parcelled_version")
annotationProcessor("com.zeoflow:parcelled-compiler:$parcelled_version")
// ...
}
```
Visit [MVN Repository](https://mvnrepository.com/artifact/com.zeoflow/parcelled)
to find the latest version of the library.
## Contributors
Parcelled for Android welcomes contributions from the community. Check
out our [contributing guidelines](contributing.md) before getting started.

0 comments on commit 911c6c0

Please sign in to comment.