Skip to content

Commit

Permalink
migrate Calculator to AndroidX
Browse files Browse the repository at this point in the history
  • Loading branch information
hussien alrubaye committed Jul 7, 2019
1 parent d6feadd commit 7f6a0c6
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 21 deletions.
Binary file added Android/Calculator/StartUp.zip
Binary file not shown.
Binary file not shown.
17 changes: 14 additions & 3 deletions Android/Calculator/StartUp/.idea/misc.xml

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

2 changes: 2 additions & 0 deletions Android/Calculator/StartUp/.idea/modules.xml

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

6 changes: 6 additions & 0 deletions Android/Calculator/StartUp/.idea/vcs.xml

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

22 changes: 10 additions & 12 deletions Android/Calculator/StartUp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.hussein.calculator"
minSdkVersion 17
targetSdkVersion 25
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
Expand All @@ -21,14 +21,12 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.0.2'
testImplementation 'junit:junit:4.12'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.hussein.startup

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {

Expand Down Expand Up @@ -57,7 +57,7 @@ class MainActivity : AppCompatActivity() {
buClickValue+="."
}
buPlusMins.id->{
buClickValue= "-"+ buClickValue
buClickValue= "-$buClickValue"
}
}
etShowNumber.setText(buClickValue)
Expand Down
6 changes: 4 additions & 2 deletions Android/Calculator/StartUp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.2-4'
ext.kotlin_version = '1.3.41'
repositories {
maven { url 'https://maven.google.com' }
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha3'
classpath 'com.android.tools.build:gradle:3.4.1'
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
Expand All @@ -18,6 +19,7 @@ allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
google()
}
}

Expand Down
2 changes: 2 additions & 0 deletions Android/Calculator/StartUp/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun May 21 20:13:21 EDT 2017
#Sun Jul 07 08:55:35 EDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-milestone-1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

0 comments on commit 7f6a0c6

Please sign in to comment.