Skip to content

Commit

Permalink
Merge pull request #7 from argyle-systems/update-gradle-kotlin-depend…
Browse files Browse the repository at this point in the history
…encies

Update Gradle, Kotlin, and dependencies to latest versions
  • Loading branch information
gs-ts authored May 5, 2022
2 parents 1398abf + 2151fb2 commit 32422c0
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 62 deletions.
16 changes: 0 additions & 16 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 22 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
}

apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 29
compileSdkVersion 31

defaultConfig {
applicationId "com.argyleexample"
minSdkVersion 23
targetSdkVersion 29
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

kotlinOptions {
jvmTarget = "11"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "androidx.preference:preference-ktx:1.1.0"
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation "androidx.preference:preference-ktx:1.2.0"

implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.4.2'

implementation 'com.argyle:argyle-plugin-android-source:4.1.1'

}

repositories {
maven {
url 'https://ci.android.com/builds/submitted/6052626/androidx_snapshot/latest/repository/'
}
}
21 changes: 12 additions & 9 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.argyleexample" >
package="com.argyleexample">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity android:name=".MainActivity"
android:theme="@style/AppTheme.NoActionBar" >
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:exported="true"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/com/argyleexample/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.preference.PreferenceManager
import android.util.Log
import android.widget.Button

import com.argyle.ArgyleConfig

import kotlinx.android.synthetic.main.main_activity.*
import com.argyle.Argyle
import com.argyle.ArgyleErrorType

Expand All @@ -29,11 +29,13 @@ class MainActivity : AppCompatActivity() {

configureArgyleSdk(null)

val newWorkerButton = findViewById<Button>(R.id.newWorkerButton)
newWorkerButton?.setOnClickListener {
Argyle.instance.config.userToken = null // nullify user token
openSdk()
}

val existingButton = findViewById<Button>(R.id.existingButton)
existingButton?.setOnClickListener {
val preferences = PreferenceManager.getDefaultSharedPreferences(this)
val token = preferences.getString(PREF_USER_TOKEN, null)
Expand Down
23 changes: 13 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext{
kotlin_version = '1.5.20'
ext {
kotlin_version = '1.6.21'
version_lifecycle_extensions = "2.0.0"
RETROFIT_VERSION = '2.4.0'
GLIDE_VERSION = '4.9.0'
}

repositories {
google()
jcenter()

gradlePluginPortal()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "com.android.tools.build:gradle:7.1.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

allprojects {
repositories {
google()
jcenter()
gradlePluginPortal()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Sun Jul 04 23:14:55 EEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
android.databinding.enableV2=true
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-6.5.1-bin.zip

0 comments on commit 32422c0

Please sign in to comment.