You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: How to contribute to the Cryptimeleon libraries
3
3
toc: true
4
4
---
5
5
6
-
# Project Setup
6
+
We are glad you are interested in contributing to Cryptimeleon.
7
+
This page will give you an overview of our contribution/developer guidelines and will point you to further information.
7
8
9
+
## Overview
10
+
11
+
The Cryptimeleon libraries consist of a number of related cryptographic libraries united under the Cryptimeleon name.
12
+
If you want to contribute, you therefore first need to decide on a specific library.
13
+
Then you can check out that library's issue tracker (we use the Github issue tracker) to find something to work on.
14
+
15
+
Cryptimeleon's [Github page](https://github.com/cryptimeleon) contains a list of those libraries.
16
+
17
+
## Project setup
18
+
19
+
Once you have decided on a library, you will need to clone it and create a project in your favourite IDE.
8
20
All the Cryptimeleon libraries use the [Gradle](https://gradle.org/) build tool.
9
21
In this guide, we show you how to set up a project in your integrated development environment of choice.
10
22
This guide is intended for development of the library itself.
11
23
12
24
If you have problems with building any of the projects, make sure you use the newest version of the Java SDK 8.
13
25
Not all versions of Java 8 are supported.
14
26
15
-
##Cloning the Repo
27
+
### Forking the repo
16
28
17
-
Naturally, the first thing to do is to clone the repository containing the library you need.
18
-
If you are reading this, you probably know how to do this.
29
+
If you don't have write access to the repository, you will need to [fork](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/working-with-forks) the repository of the library you want to modify.
30
+
Then you can apply your changes to that repository.
19
31
20
32
After this is done, we continue by creating a new project in your favorite IDE.
21
33
22
-
## Setting up a project in IntelliJ IDEA
34
+
###Setting up a project in IntelliJ IDEA
23
35
24
36
*Note: This was written for IntelliJ IDEA Version 2019.2.4*
25
37
@@ -31,7 +43,7 @@ Now browse to the path where you cloned the library repository.
31
43
The repository contains a ``build.gradle`` file.
32
44
Select it and click **OK**. Once the import process is done, the project is ready for use.
33
45
34
-
## Setting up a project in Eclipse
46
+
###Setting up a project in Eclipse
35
47
36
48
*Note: This was written for Eclipse 2020-03 (4.15.0).*
37
49
@@ -43,23 +55,35 @@ Browse to the location where you cloned the repository to and select the reposit
43
55
For example, ``/home/username/code/craco``.
44
56
Click **Finish** to finish setup. You can also click **Next** if you want to, for example, select a specific Java SDK.
45
57
46
-
## Testing Changes
58
+
###Testing changes
47
59
48
60
Once you have done some changes to a library, you might want to test the effect of these changes on the other libraries.
49
-
For example, as Craco relies on Math, changes to the math library should be followed by testing the craco library with the new changes.
61
+
For example, as Craco relies on Math, changes to the Math library should be followed by testing the craco library with the new changes.
50
62
51
63
To do this, there are two options: Local installation and composite builds.
52
64
53
-
### Composite Builds
65
+
####Composite builds
54
66
55
67
Composite builds have the advantage of not requiring you to manually install the project each time you want to test its changes.
56
68
Instead, the dependencies will automatically be newly built when required.
57
69
Furthermore, IDEs such as IntelliJ IDEA have special support for composite builds, allowing you to view the sources for any dependencies included in the composite build.
58
70
59
71
We recommend using composite builds over the local installation approach. More info on this [here]({% link contributors/composite-builds.md %}).
60
72
61
-
### Local Installation
73
+
####Local installation
62
74
63
75
For any of the libraries you can use the command ``publishToMavenLocal`` in the project root directory to install the library to the local repository (remember to build the newest version via ``gradle build`` before this).
64
76
To make sure that other libraries actually use local builds and not remote, you need to make sure that local builds are preferred compared to remote builds.
65
77
Hence, `mavenLocal()` should be listed at the top of the `repositories` section in the `build.gradle` file.
78
+
79
+
## Making changes
80
+
81
+
When making changes to the code, remember the following things:
82
+
- Stick to the existing code style
83
+
- Add Javadoc whenever necessary
84
+
- Add your changes to the `CHANGELOG.md` file in the root directory
85
+
86
+
## Contributing your changes
87
+
88
+
Once you have tested your changes locally, you will want to integrate them into the upstream repository.
89
+
You can do this by [creating a pull request from your fork](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
0 commit comments