Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from DavidCruzSky/techtask/Support-for-API-31
Browse files Browse the repository at this point in the history
Update the project and libraries to support android 12 (api 31)
  • Loading branch information
MikeMostovyi authored Sep 15, 2021
2 parents b1236df + 4620859 commit 05b4384
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 28 deletions.
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
compileSdkVersion 31
defaultConfig {
applicationId "nl.ngti.androscope.test"
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -25,13 +25,13 @@ android {
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.work:work-runtime:2.4.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.work:work-runtime:2.6.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

debugImplementation project(':lib-androscope')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
android:theme="@style/AppTheme"
tools:ignore="UnusedAttribute">
<activity
android:name=".MainActivity">
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.4.10'
ext.kotlin_version = '1.5.21'

repositories {
google()
jcenter()

mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.0.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.10.1"
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.11.1'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.17.0'
}
}

allprojects {
repositories {
google()
jcenter()

mavenCentral()
}
}

Expand Down
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Oct 26 11:09:44 CET 2020
#Thu Sep 09 00:46:36 BST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
19 changes: 9 additions & 10 deletions lib-androscope/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

apply from: "./template.gradle"

android {
compileSdkVersion 30
compileSdkVersion 31

defaultConfig {
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 31
versionCode 1
versionName "1.0"

Expand All @@ -34,15 +33,15 @@ android {


dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0"
implementation 'androidx.activity:activity:1.1.0'
implementation 'androidx.core:core-ktx:1.3.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:2.3.1"
implementation 'androidx.activity:activity-ktx:1.3.1'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'org.nanohttpd:nanohttpd-webserver:2.3.1'
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

apply plugin: 'org.jetbrains.dokka'
Expand Down
1 change: 1 addition & 0 deletions lib-androscope/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<application>
<activity
android:name=".AndroscopeActivity"
android:exported="true"
android:configChanges="orientation|keyboardHidden|screenSize|screenLayout|smallestScreenSize"
android:icon="@mipmap/androscope_ic_launcher"
android:label="@string/androscope_activity_label"
Expand Down

0 comments on commit 05b4384

Please sign in to comment.