Skip to content

Commit

Permalink
Merge pull request #8 from judemanutd/feature/kotlin-convert
Browse files Browse the repository at this point in the history
Converted to kotlin
  • Loading branch information
judemanutd authored Apr 7, 2019
2 parents 609a0a3 + 4771db6 commit 092be48
Show file tree
Hide file tree
Showing 7 changed files with 228 additions and 219 deletions.
20 changes: 13 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 27
compileSdkVersion 28
defaultConfig {
applicationId "com.judemanutd.autostarterexample"
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0"
targetSdkVersion 28
versionCode 2
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand All @@ -27,8 +29,12 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:appcompat-v7:27.1.0'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation project(':autostarter')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.judemanutd.autostarterexample;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;

import com.judemanutd.autostarter.AutoStartPermissionHelper;
Expand All @@ -13,7 +13,9 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

final Button button = findViewById(R.id.button);
button.setOnClickListener(v -> AutoStartPermissionHelper.getInstance().getAutoStartPermission(this));
Button button = findViewById(R.id.button);
button.setOnClickListener(v -> AutoStartPermissionHelper.getInstance().getAutoStartPermission(MainActivity.this));


}
}
29 changes: 18 additions & 11 deletions autostarter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'

ext {
bintrayRepo = 'Maven'
bintrayRepo = 'maven'
bintrayName = 'autostarter'

publishedGroupId = 'com.judemanutd'
publishedGroupId = 'com.github.judemanutd'
libraryName = 'Autostarter'
artifact = 'autostarter'

Expand All @@ -13,7 +15,7 @@ ext {
siteUrl = 'https://github.com/judemanutd/AutoStarter'
gitUrl = 'https://github.com/judemanutd/AutoStarter.git'

libraryVersion = '1.0.0'
libraryVersion = '1.0.1'

developerId = 'judemanutd'
developerName = 'Jude Fernandes'
Expand All @@ -25,12 +27,12 @@ ext {
}

android {
compileSdkVersion 27
compileSdkVersion 28
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0.0"
targetSdkVersion 28
versionCode 2
versionName "1.0.1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -49,9 +51,14 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

apply from: '../install.gradle'
apply from: '../bintray.gradle'
repositories {
mavenCentral()
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

This file was deleted.

Loading

0 comments on commit 092be48

Please sign in to comment.