Update to JDK 17, Gradle 7.3.3 & Android Gradle Plugin 7.1.0
Signed-off-by: psavarmattas <puranjaysavarmattas@gmail.com>
This commit is contained in:
2
.idea/compiler.xml
generated
2
.idea/compiler.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="15" />
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
||||
13
.idea/misc.xml
generated
13
.idea/misc.xml
generated
@@ -1,10 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/activity_main.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/activity_splash.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_chats.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_contacts.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_settings.xml" value="0.34010416666666665" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="GitToolBoxStore">
|
||||
<option name="projectConfigVersion" value="2" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_15_PREVIEW" project-jdk-name="15" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -7,19 +7,19 @@ android {
|
||||
compileSdk 32
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.chatcom"
|
||||
applicationId 'com.psmforums.chatcom'
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
versionCode 1
|
||||
versionName '0.0.1'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
debug {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
@@ -29,6 +29,8 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
buildToolsVersion '32.0.0'
|
||||
ndkVersion '23.1.7779620'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -38,7 +40,7 @@ dependencies {
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
testImplementation 'junit:junit:4.+'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
}
|
||||
@@ -8,34 +8,41 @@ import androidx.fragment.app.FragmentActivity
|
||||
import androidx.viewpager.widget.PagerAdapter
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.example.chatcom.mainScreens.Chats
|
||||
import com.example.chatcom.mainScreens.Contacts
|
||||
import com.example.chatcom.mainScreens.Settings
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var viewPager2: ViewPager2
|
||||
private lateinit var tabLayout : TabLayout
|
||||
private lateinit var toolbar: androidx.appcompat.widget.Toolbar
|
||||
private lateinit var appPagerAdapter: AppPagerAdapter
|
||||
private var titles = arrayListOf("Chats","Contacts","Settings")
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
toolbar = findViewById(R.id.toolbarMain)
|
||||
tabLayout = findViewById(R.id.tabLayoutMain)
|
||||
viewPager2 = findViewById(R.id.viewPager2Main)
|
||||
toolbar.title = "ChatCom"
|
||||
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
appPagerAdapter = AppPagerAdapter( this)
|
||||
viewPager2.adapter = appPagerAdapter
|
||||
|
||||
TabLayoutMediator(tabLayout,viewPager2){
|
||||
tab,position->
|
||||
tab.text = titles[position]
|
||||
}.attach()
|
||||
|
||||
|
||||
}
|
||||
class AppPagerAdapter(fragmentActivity: FragmentActivity):FragmentStateAdapter(fragmentActivity)
|
||||
{
|
||||
|
||||
class AppPagerAdapter(fragmentActivity: FragmentActivity):FragmentStateAdapter(fragmentActivity) {
|
||||
override fun getItemCount(): Int {
|
||||
return 3
|
||||
}
|
||||
@@ -43,13 +50,12 @@ class MainActivity : AppCompatActivity() {
|
||||
override fun createFragment(position: Int): Fragment {
|
||||
return when(position)
|
||||
{
|
||||
0->Chats()
|
||||
2->Contacts()
|
||||
3->Settings()
|
||||
0-> Chats()
|
||||
2-> Contacts()
|
||||
3-> Settings()
|
||||
else -> Chats()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.example.chatcom
|
||||
package com.example.chatcom.mainScreens
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.example.chatcom.R
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.example.chatcom
|
||||
package com.example.chatcom.mainScreens
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.example.chatcom.R
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.example.chatcom
|
||||
package com.example.chatcom.mainScreens
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.example.chatcom.R
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Chats">
|
||||
tools:context=".mainScreens.Chats">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Contacts">
|
||||
tools:context=".mainScreens.Contacts">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Settings">
|
||||
tools:context=".mainScreens.Settings">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
|
||||
@@ -5,7 +5,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:7.0.4"
|
||||
classpath 'com.android.tools.build:gradle:7.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Sat Jan 22 13:06:18 IST 2022
|
||||
#Wed Jan 26 16:42:57 IST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in New Issue
Block a user