Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle
#	gradle/wrapper/gradle-wrapper.properties
#	library/build.gradle
  • Loading branch information
Oleg Illiashenko committed Feb 17, 2022
2 parents 8a5954c + 26ab254 commit add96f3
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 35 deletions.
15 changes: 7 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.50'
ext.zxing_core_version = '3.4.0'
ext.glide_version = '4.10.0'
ext.kotlin_version = '1.6.10'
ext.zxing_core_version = '3.4.1'
ext.glide_version = '4.13.0'

repositories {
google()
jcenter()

mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'com.android.tools.build:gradle:7.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Nov 20 11:46:15 EET 2019
#Wed May 06 09:22:47 EEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
11 changes: 2 additions & 9 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,16 @@ apply plugin: 'kotlin-android'

apply plugin: 'kotlin-kapt'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'com.github.dcendents.android-maven'

group = "com.github.illiashenkoo.glide-barcode"

android {
compileSdkVersion 29
compileSdkVersion 32

defaultConfig {
minSdkVersion 19
targetSdkVersion 29
versionCode 3
versionName "0.0.3"
targetSdkVersion 32

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BarcodeModelLoader : ModelLoader<Barcode, Bitmap> {
width: Int,
height: Int,
options: Options
): ModelLoader.LoadData<Bitmap>? {
): ModelLoader.LoadData<Bitmap> {
return ModelLoader.LoadData(
ObjectKey(barcode),
BarcodeDataFetcher(barcode, width, height)
Expand Down
19 changes: 10 additions & 9 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ apply plugin: 'kotlin-android'

apply plugin: 'kotlin-kapt'

apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 28
buildFeatures {
viewBinding true
}
compileSdkVersion 32
defaultConfig {
applicationId "net.codecision.glidebarcode.sample"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
targetSdkVersion 32
versionCode 5
versionName "1.1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -29,9 +30,9 @@ dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'

implementation "com.google.zxing:core:$zxing_core_version"

Expand Down
4 changes: 3 additions & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import com.bumptech.glide.Glide
import com.google.zxing.BarcodeFormat
import kotlinx.android.synthetic.main.activity_main.*
import net.codecision.glidebarcode.model.Barcode
import net.codecision.glidebarcode.sample.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {

private lateinit var binding: ActivityMainBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
binding = ActivityMainBinding.inflate(layoutInflater)

setContentView(binding.root)

showFirstQr()

Expand All @@ -27,15 +31,15 @@ class MainActivity : AppCompatActivity() {

Glide.with(this)
.load(barcode)
.into(firstQrView)
.into(binding.firstQrView)
}

private fun showSecondQr() {
val barcode = Barcode("Glide", BarcodeFormat.QR_CODE)

Glide.with(this)
.load(barcode)
.into(secondQrView)
.into(binding.secondQrView)
}

private fun showEan13() {
Expand All @@ -44,7 +48,7 @@ class MainActivity : AppCompatActivity() {

Glide.with(this)
.load(barcode)
.into(ean13View)
.into(binding.ean13View)
}

}
Expand Down

0 comments on commit add96f3

Please sign in to comment.