README.md 1.6 KB
Newer Older
J
Jake Wharton 已提交
1 2 3
Retrofit
========

J
Jake Wharton 已提交
4
Type-safe HTTP client for Android and Java by Square, Inc.
J
Jake Wharton 已提交
5

J
Jake Wharton 已提交
6
For more information please see [the website][1].
J
Jake Wharton 已提交
7 8


J
Jake Wharton 已提交
9 10
Download
--------
J
Jake Wharton 已提交
11

J
Jake Wharton 已提交
12 13 14
Download [the latest JAR][2] or grab via Maven:
```xml
<dependency>
J
Jake Wharton 已提交
15
  <groupId>com.squareup.retrofit2</groupId>
J
Jake Wharton 已提交
16
  <artifactId>retrofit</artifactId>
J
Jake Wharton 已提交
17
  <version>2.4.0</version>
J
Jake Wharton 已提交
18
</dependency>
J
Jake Wharton 已提交
19
```
J
Jake Wharton 已提交
20 21
or Gradle:
```groovy
J
Jake Wharton 已提交
22
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
J
Jake Wharton 已提交
23
```
24 25 26

Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].

27
Retrofit requires at minimum Java 7 or Android 2.3.
J
Jake Wharton 已提交
28 29


30 31
R8 / ProGuard
-------------
R
Roman Parshikov 已提交
32

33
If you are using R8 or ProGuard add the options from
J
Jake Wharton 已提交
34
[this file](https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro).
R
Roman Parshikov 已提交
35

36
You might also need rules for OkHttp and Okio which are dependencies of this library.
J
Jake Wharton 已提交
37

38

39 40 41
License
=======

J
Jake Wharton 已提交
42
    Copyright 2013 Square, Inc.
J
Jake Wharton 已提交
43

44 45 46
    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
J
Jake Wharton 已提交
47

48
       http://www.apache.org/licenses/LICENSE-2.0
J
Jake Wharton 已提交
49

50 51 52 53 54
    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.
J
Jake Wharton 已提交
55 56


57
 [1]: https://square.github.io/retrofit/
J
John Carlson 已提交
58
 [2]: https://search.maven.org/remote_content?g=com.squareup.retrofit2&a=retrofit&v=LATEST
59
 [snap]: https://oss.sonatype.org/content/repositories/snapshots/