File tree Expand file tree Collapse file tree 8 files changed +345
-417
lines changed
src/main/java/com/github/zagum/switchicon/sample
src/main/java/com/github/zagum/switchicon Expand file tree Collapse file tree 8 files changed +345
-417
lines changed Original file line number Diff line number Diff line change 11buildscript {
2- repositories {
3- jcenter()
4- google()
5- }
6- dependencies {
7- classpath ' com.android.tools.build:gradle:3.1.4'
8- }
2+ ext. kotlin_version = ' 1.3.31'
3+ repositories {
4+ jcenter()
5+ google()
6+ }
7+ dependencies {
8+ classpath ' com.android.tools.build:gradle:3.4.1'
9+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
10+ }
911}
1012
1113allprojects {
12- repositories {
13- jcenter()
14- google()
15- }
14+ repositories {
15+ jcenter()
16+ google()
17+ }
1618}
1719
1820ext {
19- compileSdkVersion = 27
20- buildToolsVersion = ' 27 .0.3'
21- minSdkVersion = 15
22- targetSdkVersion = compileSdkVersion
21+ compileSdkVersion = 28
22+ buildToolsVersion = ' 28 .0.3'
23+ minSdkVersion = 15
24+ targetSdkVersion = compileSdkVersion
2325
24- supportLibVersion = ' 27.1.1 '
26+ supportLibVersion = ' 1.0.2 '
2527}
2628
2729task clean (type : Delete ) {
28- delete rootProject. buildDir
30+ delete rootProject. buildDir
2931}
Original file line number Diff line number Diff line change 1- # Thu Mar 29 16:29:46 MSK 2018
1+ # Wed May 29 15:32:16 MSK 2019
22distributionBase =GRADLE_USER_HOME
33distributionPath =wrapper/dists
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
6- distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
6+ distributionUrl =https\://services.gradle.org/distributions/gradle-5.4.1 -all.zip
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.application'
2+ apply plugin : ' kotlin-android-extensions'
3+ apply plugin : ' kotlin-android'
24
35dependencies {
4- implementation project(" :switchicon" )
5- implementation " com.android.support:appcompat-v7:$supportLibVersion "
6+ implementation project(" :switchicon" )
7+ implementation " androidx.appcompat:appcompat:$supportLibVersion "
8+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
69}
710
811android {
9- compileSdkVersion rootProject. ext. compileSdkVersion
10- buildToolsVersion rootProject. ext. buildToolsVersion
12+ compileSdkVersion rootProject. ext. compileSdkVersion
13+ buildToolsVersion rootProject. ext. buildToolsVersion
1114
12- defaultConfig {
13- applicationId " com.github.zagum.switchicon.sample"
14- minSdkVersion rootProject. ext. minSdkVersion
15- targetSdkVersion rootProject. ext. targetSdkVersion
16- versionCode 1
17- versionName " 1.0"
15+ defaultConfig {
16+ applicationId " com.github.zagum.switchicon.sample"
17+ minSdkVersion rootProject. ext. minSdkVersion
18+ targetSdkVersion rootProject. ext. targetSdkVersion
19+ versionCode 1
20+ versionName " 1.0"
1821
19- vectorDrawables. useSupportLibrary = true
20- }
22+ vectorDrawables. useSupportLibrary = true
23+ }
24+ }
25+ repositories {
26+ mavenCentral()
2127}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package com.github.zagum.switchicon.sample
2+
3+ import android.app.Activity
4+ import android.os.Bundle
5+ import kotlinx.android.synthetic.main.activity_sample.*
6+
7+ class SampleActivity : Activity () {
8+ override fun onCreate (savedInstanceState : Bundle ? ) {
9+ super .onCreate(savedInstanceState)
10+ setContentView(R .layout.activity_sample)
11+ button1.setOnClickListener { switchIconView1.switchState() }
12+ button2.setOnClickListener { switchIconView2.switchState() }
13+ button3.setOnClickListener { switchIconView3.switchState() }
14+ }
15+ }
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
2+ apply plugin : ' kotlin-android-extensions'
3+ apply plugin : ' kotlin-android'
24
35dependencies {
4- implementation " com.android.support:appcompat-v7:$supportLibVersion "
6+ implementation " androidx.appcompat:appcompat:$supportLibVersion "
7+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
58}
69
710android {
8- compileSdkVersion rootProject. ext. compileSdkVersion
9- buildToolsVersion rootProject. ext. buildToolsVersion
11+ compileSdkVersion rootProject. ext. compileSdkVersion
12+ buildToolsVersion rootProject. ext. buildToolsVersion
1013
11- defaultConfig {
12- minSdkVersion rootProject. ext. minSdkVersion
13- }
14+ defaultConfig {
15+ minSdkVersion rootProject. ext. minSdkVersion
16+ }
17+ }
18+ repositories {
19+ mavenCentral()
1420}
You can’t perform that action at this time.
0 commit comments