Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit 3db5fd9

Browse files
authored
New release version 1.2.0 (#37)
* Mew release version 1.2.0. Upgraded to retroswagger 1.1.0. And changed org to Adevinta. * changed dist to trusty * Updated changelog * Updated tests
1 parent 1425ae7 commit 3db5fd9

14 files changed

+434
-369
lines changed

.github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ If you would like to contribute code you can do so through GitHub by forking the
66
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible.
77

88
1. Create an issue to discuss about your idea
9-
2. [Fork it] (https://github.com/SchibstedSpain/protein/fork)
9+
2. [Fork it] (https://github.com/AdevintaSpain/protein/fork)
1010
3. Create your feature branch (`git checkout -b my-new-feature`)
1111
4. Commit your changes (`git commit -am 'Add some feature'`)
1212
5. Push to the branch (`git push origin my-new-feature`)

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: java
2+
dist: trusty
23
jdk:
34
- oraclejdk8
45

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Removed `/` from the beginning of annotation paths
1+
Upgraded Retroswagger to version 1.1.0 that uses the latest version of Kotlinpoet (1.3.0).
2+
Also we have raised IDE compatibility version.

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2016 Schibsted Classified Media Spain S.L.
189+
Copyright 2016 Adevinta Spain S.L.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

Protein.ipr

+130-79
Large diffs are not rendered by default.

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
Title: Protein - Kotlin code generator for Retrofit2 and RxJava2 based on Swagger
33
Description: Protein is a plugin for intelliJ that automates the build of "Agents" for Android in Kotlin. It generates the code for Retrofit based on a Swagger endpoint.
4-
Author: SchibstedSpain
4+
Author: AdevintaSpain
55
-->
66

77
<img src="media/protein_logo.png" align="left" height="128px" />
@@ -40,14 +40,14 @@ Protein is a plugin for intelliJ that automates the build of Retrofit "Interface
4040
4141

4242
This scientific definition defines quite good the objective of this Plugin in an abstract way.
43-
For many time at Schibsted Spain we struggled with the idea of making a good and maintainable architecture for Android.
43+
For many time at Adevinta Spain we struggled with the idea of making a good and maintainable architecture for Android.
4444
It's been some time until we got one that fits with our needs but we still have a lot of errors and issues that human beings do every time we make manual work.
4545
That's were we came to the idea of automatization and make new components with all we need.
4646

4747
Protein is our approach to work better, be more productive and reliable.
4848

4949

50-
*<b>NOTE:</b> Protein is based on the library [Retroswagger](https://github.com/SchibstedSpain/Retroswagger) that is the core for the kotlin builder that parses swagger json and generates the kotlin code.*
50+
*<b>NOTE:</b> Protein is based on the library [Retroswagger](https://github.com/AdevintaSpain/Retroswagger) that is the core for the kotlin builder that parses swagger json and generates the kotlin code.*
5151

5252
### Features
5353

@@ -279,7 +279,7 @@ or you can check: [https://plugins.jetbrains.com/plugin/10206-protein--android-c
279279

280280
1. If you want to build it locally you need download the latest version of IntelliJ Community
281281
[https://www.jetbrains.com/idea/download/#section=mac](https://www.jetbrains.com/idea/download/#section=mac)
282-
2. Clone this repository ([email protected]:SchibstedSpain/protein.git)
282+
2. Clone this repository ([email protected]:AdevintaSpain/protein.git)
283283
3. Execute "RunIdea" gradle task
284284

285285
Who made this
@@ -306,7 +306,7 @@ Contribute
306306
----------
307307

308308
1. Create an issue to discuss about your idea
309-
2. [Fork it] (https://github.com/SchibstedSpain/protein/fork)
309+
2. [Fork it] (https://github.com/AdevintaSpain/protein/fork)
310310
3. Create your feature branch (`git checkout -b my-new-feature`)
311311
4. Commit your changes (`git commit -am 'Add some feature'`)
312312
5. Push to the branch (`git push origin my-new-feature`)
@@ -317,13 +317,13 @@ Contribute
317317
Bugs and Feedback
318318
-----------------
319319

320-
For bugs, questions and discussions please use the [Github Issues](https://github.com/SchibstedSpain/protein/issues).
320+
For bugs, questions and discussions please use the [Github Issues](https://github.com/AdevintaSpain/protein/issues).
321321

322322

323323
License
324324
-------
325325

326-
Copyright 2018 Schibsted Classified Media Spain S.L.
326+
Copyright 2018 Adevinta Spain S.L.
327327

328328
Licensed under the Apache License, Version 2.0 (the "License");
329329
you may not use this file except in compliance with the License.

build.gradle

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.21'
2+
ext.kotlin_version = '1.3.50'
33

44
repositories {
55
mavenCentral()
@@ -67,7 +67,7 @@ sourceCompatibility = 1.8
6767
group 'com.schibsted.protein'
6868
version buildVersion
6969

70-
def intelliJVersion = 'IC-183.4588.61'
70+
def intelliJVersion = '192.6603.28'
7171
def sinceVersion = '172.0'
7272

7373
intellij {
@@ -82,7 +82,7 @@ publish {
8282
artifactId = 'protein'
8383
publishVersion = "${buildVersion}"
8484
desc = 'Protein is a plugin for intelliJ that automates the build of "Agents" for Android in Kotlin. It generates the code for Retrofit based on a Swagger endpoint.'
85-
website = 'https://github.com/SchibstedSpain/protein'
85+
website = 'https://github.com/AdevintaSpain/protein'
8686
}
8787

8888
publishPlugin {
@@ -134,10 +134,9 @@ ktlint {
134134
}
135135

136136
dependencies {
137-
compile 'com.squareup:kotlinpoet:1.0.0-RC2'
138137
compile "io.reactivex.rxjava2:rxjava:2.1.16"
139138
compile 'com.squareup.retrofit2:retrofit:2.4.0'
140-
compile "com.schibsted.spain:retroswagger:1.0.0"
139+
compile "com.schibsted.spain:retroswagger:1.1.0"
141140

142141
def jacksonVersion = '2.8.4'
143142
compile "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
@@ -168,7 +167,7 @@ dependencies {
168167
testCompile 'org.jetbrains.kotlin:kotlin-test-junit:1.1.3-2'
169168
testCompile 'org.mockito:mockito-core:1.10.19'
170169
testCompile 'junit:junit:4.12'
171-
testCompile "com.schibsted.spain:retroswagger:1.0.0"
170+
testCompile "com.schibsted.spain:retroswagger:1.1.0"
172171
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
173172
}
174173
compileKotlin {

media/plugin_description.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h3 id="background">Background</h3><br/>
1111
</blockquote>
1212

1313
<p>This scientific definition defines quite good the objective of this Plugin in an abstract way.
14-
For many time at <a href="http://www.schibsted.es">Schibsted Spain</a> we struggled with the idea of making a good and maintainable architecture for Android.
14+
For many time at <a href="http://www.adevinta.com">Adevinta Spain</a> we struggled with the idea of making a good and maintainable architecture for Android.
1515
It's been some time until we got one that fits with our needs but we still have a lot of errors and issues that human beings do every time we make manual work.
1616
That's were we came to the idea of automatization and make new components with all we need including tests, data sources even use cases and Presenters.</p>
1717

src/main/kotlin/protein/ide/component/ProteinUpdateComponent.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ class ProteinUpdateComponent(project: Project) : AbstractProjectComponent(projec
2929
<br/>
3030
Thank you for downloading <b>Protein</b>!<br>
3131
If you find this plugin helpful,
32-
<b><a href="https://github.com/SchibstedSpain/Protein">
32+
<b><a href="https://github.com/AdevintaSpain/Protein">
3333
Please give us a star on Github</a></b><br/>
34-
If you find any issue, <b><a href="https://github.com/SchibstedSpain/Protein/issues/new/choose">Feel free to raise a issue</a></b><br/>
35-
See <b><a href="https://github.com/SchibstedSpain/Protein/blob/master/CHANGELOG.md">Changelog</a></b>
34+
If you find any issue, <b><a href="https://github.com/AdevintaSpain/Protein/issues/new/choose">Feel free to raise a issue</a></b><br/>
35+
See <b><a href="https://github.com/AdevintaSpain/Protein/blob/master/CHANGELOG.md">Changelog</a></b>
3636
for more details.
3737
"""
3838

src/main/resources/META-INF/plugin.xml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<idea-plugin>
22
<id>com.schibsted.protein</id>
33
<name>Protein - Kotlin code generator for Retrofit2 and RxJava2 based on Swagger</name>
4-
<version>1.1.3</version>
5-
<vendor email="ferran.pons@schibsted.com" url="http://www.schibsted.es">Schibsted Spain</vendor>
4+
<version>1.2.0</version>
5+
<vendor email="ferran.pons@adevinta.com" url="http://www.adevinta.com">Adevinta Spain</vendor>
66

77
<description><![CDATA[
88
@@ -12,7 +12,7 @@
1212
It generates the Kotlin code for Retrofit based on a Swagger schema endpoint.
1313
This plugin only allows you to create an API Rest Interface and the Models for Retrofit 2 and RxJava 2.</p>
1414
15-
<p>For many time at <a href="http://www.schibsted.es">Schibsted Spain</a> we struggled with the idea of making a good and maintainable architecture for Android.
15+
<p>For many time at <a href="http://www.adevinta.com">Adevinta Spain</a> we struggled with the idea of making a good and maintainable architecture for Android.
1616
It's been some time until we got one that fits with our needs but we still have a lot of errors and issues that human beings do every time we make manual work.
1717
That's were we came to the idea of automatization and make new components with all we need including tests and data sources.</p>
1818
@@ -42,7 +42,8 @@
4242
]]></description>
4343

4444
<change-notes><![CDATA[
45-
Removed `/` from the beginning of annotation paths
45+
Upgraded Retroswagger to version 1.1.0 that uses the latest version of Kotlinpoet (1.3.0).
46+
Also we have raised IDE compatibility version
4647
]]>
4748
</change-notes>
4849

src/test/kotlin/KotlinApiBuilderShould.kt

+35-35
Original file line numberDiff line numberDiff line change
@@ -49,41 +49,41 @@ class KotlinApiBuilderShould {
4949
kotlinApiBuilder.build()
5050
assertEquals("",
5151
"package com.mycompany.mylibrary\n" +
52-
"\n" +
53-
"import io.reactivex.Completable\n" +
54-
"import io.reactivex.Single\n" +
55-
"import retrofit2.http.DELETE\n" +
56-
"import retrofit2.http.GET\n" +
57-
"import retrofit2.http.PUT\n" +
58-
"import retrofit2.http.Path\n" +
59-
"\n" +
60-
"interface componentNameApiInterface {\n" +
61-
" /**\n" +
62-
" * Get all favorites for this user\n" +
63-
" *\n" +
64-
" * @param Authorization Authorization\n" +
65-
" */\n" +
66-
" @GET(\"favorites\")\n" +
67-
" fun getFavorites(): Single<GetFavoritesResponse>\n" +
68-
"\n" +
69-
" /**\n" +
70-
" * Save favorite\n" +
71-
" *\n" +
72-
" * @param adId adId\n" +
73-
" * @param Authorization Authorization\n" +
74-
" */\n" +
75-
" @PUT(\"favorites/{adId}\")\n" +
76-
" fun saveFavorite(@Path(\"adId\") adId: String): Completable\n" +
77-
"\n" +
78-
" /**\n" +
79-
" * Delete favorite\n" +
80-
" *\n" +
81-
" * @param adId adId\n" +
82-
" * @param Authorization Authorization\n" +
83-
" */\n" +
84-
" @DELETE(\"favorites/{adId}\")\n" +
85-
" fun deleteFavorite(@Path(\"adId\") adId: String): Completable\n" +
86-
"}\n",
52+
"\n" +
53+
"import io.reactivex.Completable\n" +
54+
"import io.reactivex.Single\n" +
55+
"import retrofit2.http.DELETE\n" +
56+
"import retrofit2.http.GET\n" +
57+
"import retrofit2.http.PUT\n" +
58+
"import retrofit2.http.Path\n" +
59+
"\n" +
60+
"interface componentNameApiInterface {\n" +
61+
" /**\n" +
62+
" * Get all favorites for this user\n" +
63+
" *\n" +
64+
" * @param Authorization Authorization\n" +
65+
" */\n" +
66+
" @GET(\"favorites\")\n" +
67+
" fun getFavorites(): Single<GetFavoritesResponse>\n" +
68+
"\n" +
69+
" /**\n" +
70+
" * Save favorite\n" +
71+
" *\n" +
72+
" * @param adId adId\n" +
73+
" * @param Authorization Authorization\n" +
74+
" */\n" +
75+
" @PUT(\"favorites/{adId}\")\n" +
76+
" fun saveFavorite(@Path(\"adId\") adId: String): Completable\n" +
77+
"\n" +
78+
" /**\n" +
79+
" * Delete favorite\n" +
80+
" *\n" +
81+
" * @param adId adId\n" +
82+
" * @param Authorization Authorization\n" +
83+
" */\n" +
84+
" @DELETE(\"favorites/{adId}\")\n" +
85+
" fun deleteFavorite(@Path(\"adId\") adId: String): Completable\n" +
86+
"}\n",
8787
getGeneratedApiInterfaceString(kotlinApiBuilder.getGeneratedApiInterfaceTypeSpec()))
8888
}
8989

0 commit comments

Comments
 (0)