Skip to content

Commit

Permalink
Convert to Kotlin + v1.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscofranco committed Sep 23, 2020
1 parent 0c2684a commit 79fa1e1
Show file tree
Hide file tree
Showing 40 changed files with 479 additions and 576 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
/.idea
22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

18 changes: 0 additions & 18 deletions .idea/gradle.xml

This file was deleted.

33 changes: 0 additions & 33 deletions .idea/misc.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

42 changes: 28 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
compileSdkVersion 30
buildToolsVersion "30.0.2"

defaultConfig {
applicationId "com.franco.demomode"
minSdkVersion 24
targetSdkVersion 26
versionName "1.2"
versionCode getVersionCodeTimestamp()
targetSdkVersion 30
versionName "1.6"
versionCode 1910030257
archivesBaseName = "DemoModeTile-${android.defaultConfig.versionName}"
}

Expand Down Expand Up @@ -46,15 +47,20 @@ android {
shrinkResources true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
manifestPlaceholders = [vmSafeModeEnabled: "false"]
}

debug {
minifyEnabled false
shrinkResources false
manifestPlaceholders = [vmSafeModeEnabled: "true"]
}
}

buildFeatures {
viewBinding = true
}
kotlinOptions {
jvmTarget = '1.8'
}
}

def readKeystoreProperties(def configName) {
Expand All @@ -70,13 +76,21 @@ def readKeystoreProperties(def configName) {
}
}

static def getVersionCodeTimestamp() {
return new Date().format('yyMMddHHmm').toInteger()
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation "androidx.fragment:fragment-ktx:1.2.5"
implementation "androidx.core:core-ktx:1.3.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'

def lifecycle_version = "2.3.0-alpha07"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:design:26.1.0'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
repositories {
mavenCentral()
}
25 changes: 10 additions & 15 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
<manifest
package="com.franco.demomode"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.franco.demomode">

<uses-permission
android:name="android.permission.DUMP"
tools:ignore="ProtectedPermissions"/>
tools:ignore="ProtectedPermissions" />

<uses-permission
android:name="android.permission.WRITE_SECURE_SETTINGS"
tools:ignore="ProtectedPermissions"/>
tools:ignore="ProtectedPermissions" />

<application
android:name=".application.App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/DemoModeTheme"
android:vmSafeMode="${vmSafeModeEnabled}">
android:theme="@style/DemoModeTheme">

<activity
android:name=".activities.MainActivity">
<activity android:name=".activities.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Expand All @@ -35,7 +30,7 @@
android:label="@string/demo_mode"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE"/>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>

Expand Down
112 changes: 0 additions & 112 deletions app/src/main/java/com/franco/demomode/Utils.java

This file was deleted.

Loading

0 comments on commit 79fa1e1

Please sign in to comment.