Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Updating Gradle and Dependencies #18

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
/.idea
.DS_Store
/build
/captures
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
If someone would like to fork it an maintained it, we can post a link here.

## Installation
Use [JitPack.io](https://jitpack.io/#qoqa/glide-svg/4.0.2)
Use [![](https://jitpack.io/v/projectdelta6/glide-svg.svg)](https://jitpack.io/#projectdelta6/glide-svg)


```
repositories {
Expand All @@ -16,13 +17,13 @@ repositories {
```
dependencies {
...
implementation 'com.github.qoqa:glide-svg:4.0.2'
implementation 'com.github.projectdelta6:glide-svg:4.15.1'
}
```

## Usage
```kotlin
GlideApp.with(this)
Glide.with(this)
.load(url)
.into(picto_view)
```
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '2.0.0'
ext.GlideVersion = "4.16.0"
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:8.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'org.jetbrains.kotlin.android' version '2.0.0' apply false
id 'com.google.devtools.ksp' version '2.0.0-1.0.22' apply false
}

allprojects {
repositories {
Expand All @@ -21,3 +26,8 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}

wrapper {
gradleVersion = "8.2.2"
distributionType = Wrapper.DistributionType.ALL
}
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 8 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
jdk:
- openjdk11
before_install:
- sdk update
- sdk install java 17.0.6-amzn
- sdk use java 17.0.6-amzn
- sdk install maven
- mvn -v
45 changes: 21 additions & 24 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'maven-publish'
apply plugin: 'com.google.devtools.ksp'

//for JitPack
group = 'com.github.projectdelta6'

android {
compileSdkVersion 32
compileSdk 34
defaultConfig {
minSdkVersion 14
targetSdkVersion 32
minSdkVersion 19
targetSdk 34
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
namespace = "ch.qoqa.glide"
}

publishing {
publications {
maven(MavenPublication) {
groupId 'com.github.qoqa'
artifactId 'glide-svg'
version '4.0.0'
namespace = "com.duck.glide_svg"

afterEvaluate {
from(components["release"])
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}
}

dependencies {
api 'com.github.bumptech.glide:glide:4.13.2'
api 'com.github.bumptech.glide:annotations:4.13.2'
kapt 'com.github.bumptech.glide:compiler:4.13.2'
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

api "com.github.bumptech.glide:glide:$GlideVersion"
api "com.github.bumptech.glide:annotations:$GlideVersion"
ksp "com.github.bumptech.glide:ksp:$GlideVersion"
api 'com.caverock:androidsvg-aar:1.4'

implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ch.qoqa.glide.svg

import android.graphics.Rect
import com.bumptech.glide.load.Options
import com.bumptech.glide.load.ResourceDecoder
import com.bumptech.glide.load.engine.Resource
Expand Down
26 changes: 17 additions & 9 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.devtools.ksp'

android {
compileSdkVersion 32
compileSdk 34

defaultConfig {
applicationId "ch.qoqa.sample"
minSdkVersion 14
targetSdkVersion 32
minSdkVersion 21
targetSdk 34
versionCode 1
versionName "1.0"

Expand All @@ -22,17 +22,25 @@ android {
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}

buildFeatures {
viewBinding = true
}
namespace 'ch.qoqa.sample'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.7.0'

implementation "com.github.bumptech.glide:glide:$GlideVersion"
ksp "com.github.bumptech.glide:ksp:$GlideVersion"
implementation (project(':library'))

implementation 'com.github.bumptech.glide:glide:4.13.2'
kapt 'com.github.bumptech.glide:compiler:4.13.2'
}
3 changes: 1 addition & 2 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ch.qoqa.sample">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Expand Down
9 changes: 5 additions & 4 deletions sample/src/main/java/ch/qoqa/sample/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import android.widget.BaseAdapter
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import ch.qoqa.sample.databinding.MainActivityBinding
import com.bumptech.glide.Glide

class MainActivity : AppCompatActivity() {

Expand All @@ -22,25 +23,25 @@ class MainActivity : AppCompatActivity() {
// TODO add example with bitmap
val images = listOf(
Images {
GlideApp.with(this)
Glide.with(this)
.load("https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/android.svg?1")
.into(it)
},
Images {
it.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP)
GlideApp.with(this)
Glide.with(this)
.load("https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/android.svg?2")
.into(it)
},
Images {
it.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP)
GlideApp.with(this)
Glide.with(this)
.load("<svg height=\"100\" width=\"100\" viewBox=\"0 0 100 100\"><circle cx=\"50\" cy=\"50\" r=\"40\" stroke=\"black\" stroke-width=\"3\" fill=\"red\" /></svg> ")
.into(it)
},
Images {
it.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP)
GlideApp.with(this)
Glide.with(this)
.load("<svg height=\"100\" width=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" stroke=\"black\" stroke-width=\"3\" fill=\"red\" /></svg> ")
.into(it)
}
Expand Down