Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit bf81c38

Browse files
committed
fix builds issues
1 parent db75e15 commit bf81c38

File tree

7 files changed

+30
-37
lines changed

7 files changed

+30
-37
lines changed

build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext {
4-
compose_version = '1.7.20'
5-
}
63
repositories {
74
google()
85
mavenCentral()
96
}
107
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.0.4'
12-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
8+
classpath 'com.android.tools.build:gradle:7.3.1'
9+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
1310

1411
// NOTE: Do not place your application dependencies here; they belong
1512
// in the individual module build.gradle files
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Nov 30 20:29:02 CAT 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

sample/build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ android {
2626
}
2727
}
2828
compileOptions {
29-
sourceCompatibility JavaVersion.VERSION_1_8
30-
targetCompatibility JavaVersion.VERSION_1_8
29+
sourceCompatibility JavaVersion.VERSION_11
30+
targetCompatibility JavaVersion.VERSION_11
3131
}
3232
kotlinOptions {
33-
jvmTarget = '1.8'
34-
useIR = true
33+
jvmTarget = '11'
3534
}
3635
buildFeatures {
3736
compose true
@@ -44,6 +43,7 @@ android {
4443
excludes += '/META-INF/{AL2.0,LGPL2.1}'
4544
}
4645
}
46+
namespace 'tech.devscast.validable_sample'
4747
}
4848

4949
dependencies {
@@ -56,12 +56,13 @@ dependencies {
5656
implementation platform('androidx.compose:compose-bom:2022.10.00')
5757

5858
implementation "androidx.compose.ui:ui"
59+
implementation "androidx.activity:activity-compose:1.6.1"
5960
implementation "androidx.compose.material:material"
6061
implementation "androidx.compose.ui:ui-tooling-preview"
6162
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
62-
testImplementation 'junit:junit:4.+'
63-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
64-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
65-
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
63+
testImplementation 'junit:junit:4.13.2'
64+
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
65+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
66+
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.3.1"
6667
debugImplementation "androidx.compose.ui:ui-tooling"
6768
}

sample/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="tech.devscast.validable_sample">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

sample/src/main/java/tech/devscast/validable_sample/MainActivity.kt

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,20 @@ import androidx.activity.compose.setContent
66
import androidx.compose.animation.ExperimentalAnimationApi
77
import androidx.compose.material.MaterialTheme
88
import androidx.compose.material.Surface
9-
import androidx.compose.material.Text
10-
import androidx.compose.runtime.Composable
11-
import androidx.compose.ui.tooling.preview.Preview
129
import tech.devscast.validable_sample.ui.screens.InputScreen
1310
import tech.devscast.validable_sample.ui.theme.ValidableTheme
1411

1512
class MainActivity : ComponentActivity() {
16-
@ExperimentalAnimationApi
17-
override fun onCreate(savedInstanceState: Bundle?) {
18-
super.onCreate(savedInstanceState)
19-
setContent {
20-
ValidableTheme {
21-
// A surface container using the 'background' color from the theme
22-
Surface(color = MaterialTheme.colors.background) {
23-
InputScreen()
24-
}
25-
}
26-
}
27-
}
13+
@ExperimentalAnimationApi
14+
override fun onCreate(savedInstanceState: Bundle?) {
15+
super.onCreate(savedInstanceState)
16+
setContent {
17+
ValidableTheme {
18+
// A surface container using the 'background' color from the theme
19+
Surface(color = MaterialTheme.colors.background) {
20+
InputScreen()
21+
}
22+
}
23+
}
24+
}
2825
}

validable/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ android {
2323
}
2424

2525
compileOptions {
26-
sourceCompatibility JavaVersion.VERSION_1_8
27-
targetCompatibility JavaVersion.VERSION_1_8
26+
sourceCompatibility JavaVersion.VERSION_11
27+
targetCompatibility JavaVersion.VERSION_11
2828
}
2929
kotlinOptions {
30-
jvmTarget = '1.8'
31-
useIR = true
30+
jvmTarget = '11'
3231
}
3332
buildFeatures {
3433
compose true
@@ -41,6 +40,7 @@ android {
4140
excludes += '/META-INF/{AL2.0,LGPL2.1}'
4241
}
4342
}
43+
namespace 'tech.devscast.validable'
4444
}
4545

4646
dependencies {
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="tech.devscast.validable">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
</manifest>

0 commit comments

Comments
 (0)