Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ag2s20150909/cronet-repo
https://github.com/ag2s20150909/cronet-repo
cronet
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/ag2s20150909/cronet-repo
- Owner: ag2s20150909
- Created: 2021-07-23T19:49:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T01:40:51.000Z (16 days ago)
- Last Synced: 2024-10-30T02:53:27.702Z (16 days ago)
- Topics: cronet
- Language: Java
- Homepage:
- Size: 559 MB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Cronet repo
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/ag2s20150909/cronet-repo)](https://github.com/ag2s20150909/cronet-repo/releases)
[![GitHub last commit](https://img.shields.io/github/last-commit/ag2s20150909/cronet-repo)](https://github.com/ag2s20150909/cronet-repo/commits)
[![](https://data.jsdelivr.com/v1/package/gh/ag2s20150909/cronet-repo/badge?style=rounded)](https://www.jsdelivr.com/package/gh/ag2s20150909/cronet-repo)
[![](https://jitpack.io/v/ag2s20150909/cronet-repo.svg)](https://jitpack.io/#ag2s20150909/cronet-repo)Cronet binary files are
from [Cronet Google Cloud Platform](https://console.cloud.google.com/storage/browser/chromium-cronet/android)You can find the last cronet version numbert
here:[ChromiumDash](https://chromiumdash.appspot.com/releases?platform=Android)## Usage
### Stable
Get it from Jitpack
110 version is broken and 111 version need add
```groovy
implementation 'com.google.protobuf:protobuf-javalite:3.21.12'
``````groovy
maven { url 'https://jitpack.io' }
``````groovy
dependencies {
//All in once
implementation('com.github.ag2s20150909:cronet-repo:108.0.5359.128') { exclude(group: "org.chromium.net") }//or implementation you need
implementation('com.github.ag2s20150909.cronet-repo:core:108.0.5359.128') { exclude(group: "org.chromium.net") }
implementation 'com.github.ag2s20150909.cronet-repo:okhttp:108.0.5359.128'
implementation 'com.github.ag2s20150909.cronet-repo:okhttp-kt:108.0.5359.128'
implementation 'com.github.ag2s20150909.cronet-repo:glide:108.0.5359.128'
}
```Get it from Github Action
```groovy
maven { url "https://raw.githubusercontent.com/ag2s20150909/cronet-repo/Stable/repo/" }
maven { url 'https://raw.fastgit.org/ag2s20150909/cronet-repo/Stable/repo/' }
maven { url "https://cdn.staticaly.com/gh/ag2s20150909/cronet-repo/Stable/repo/" }
``````groovy
def cronet_version = "stable-SNAPSHOT"
implementation("me.ag2s.cronet:core:$cronet_version")
implementation("me.ag2s.cronet:okhttp:$cronet_version")
implementation("me.ag2s.cronet:okhttp-kt:$cronet_version")
implementation("me.ag2s.cronet:glide:$cronet_version")
```Show more branches
### Beta
```groovy
maven { url "https://raw.githubusercontent.com/ag2s20150909/cronet-repo/Beta/repo/" }
maven { url 'https://raw.fastgit.org/ag2s20150909/cronet-repo/Beta/repo/' }
maven { url "https://cdn.staticaly.com/gh/ag2s20150909/cronet-repo/Beta/repo/" }
``````groovy
def cronet_version = "beta-SNAPSHOT"
implementation("me.ag2s.cronet:core:$cronet_version")
implementation("me.ag2s.cronet:okhttp:$cronet_version")
implementation("me.ag2s.cronet:okhttp-kt:$cronet_version")
implementation("me.ag2s.cronet:glide:$cronet_version")
```### Dev
```groovy
maven { url "https://raw.githubusercontent.com/ag2s20150909/cronet-repo/Dev/repo/" }
maven { url 'https://raw.fastgit.org/ag2s20150909/cronet-repo/Dev/repo/' }
maven { url "https://cdn.staticaly.com/gh/ag2s20150909/cronet-repo/Dev/repo/" }
``````groovy
def cronet_version = "dev-SNAPSHOT"
implementation("me.ag2s.cronet:core:$cronet_version")
implementation("me.ag2s.cronet:okhttp:$cronet_version")
implementation("me.ag2s.cronet:okhttp-kt:$cronet_version")
implementation("me.ag2s.cronet:glide:$cronet_version")
```### Canary
```groovy
maven { url "https://raw.githubusercontent.com/ag2s20150909/cronet-repo/Canary/repo/" }
maven { url 'https://raw.fastgit.org/ag2s20150909/cronet-repo/Canary/repo/' }
maven { url "https://cdn.staticaly.com/gh/ag2s20150909/cronet-repo/Canary/repo/" }
``````groovy
def cronet_version = "canary-SNAPSHOT"
implementation("me.ag2s.cronet:core:$cronet_version")
implementation("me.ag2s.cronet:okhttp:$cronet_version")
implementation("me.ag2s.cronet:okhttp-kt:$cronet_version")
implementation("me.ag2s.cronet:glide:$cronet_version")
``````kotlin
val cronetEngine: CronetEngine by lazy {
val builder = MyCronetEngine.Builder(appCtx).apply {
....
}
builder.build().also {
//For Glide
CronetHolder.setEngine(it)
}
}```
## Install
#### 1,Get source code
```bash
git clone https://github.com/ag2s20150909/cronet-repo.git
```#### 2,Edit gradle.properties file
you can edit ```/cronet-repo/gradle.properties```
#### 3,Download Cronet and Apply
```bash
gradlew cronetlib:downloadCronet
```#### 4,Generate AAR
```bash
gradlew cronetlib:assemble
```### install Python and gsutil
install [python3](https://www.python.org/downloads/)If your python dont have pip,install pip.
```python
python -m ensurepip
```
Install gsutil from PyPI
```
pip install gsutil
```For more infromation see [Gsuti Docs](https://cloud.google.com/storage/docs/gsutil_install)