-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Android 15 #127
Merged
Merged
Support Android 15 #127
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a8c73c8
Bump compile sdk version to 35 and add replace jcenter with mavenCent…
sshropshire fac5056
Remove LeakCanary and upgrade Android Gradle Plugin.
sshropshire 9ab50ce
Update AGP version to fix compilation errors.
sshropshire 5bf7bcc
Use updated maven plugin for deployment.
sshropshire 95d0e8f
Use updated maven publish plugin and support edge-to-edge.
sshropshire e2d95c4
Update Sample project dependencies.
sshropshire 46b7619
Add CHANGELOG entry.
sshropshire ea252e5
Update unit test dependencies and fix unit tests.
sshropshire 2f81f20
Update github workflow.
sshropshire 36651f3
Make target java version explicit.
sshropshire 486a8e0
Update CHANGELOG with target Java SDK version.
sshropshire b0d4a3d
Revert target Java version to 8.
sshropshire 8618b86
Update CHANGELOG.md
sshropshire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
plugins { | ||
id 'com.android.library' | ||
id 'de.marcphilipp.nexus-publish' | ||
id 'signing' | ||
} | ||
|
||
android { | ||
compileSdkVersion rootProject.compileSdkVersion | ||
buildToolsVersion '30.0.2' | ||
compileSdk rootProject.compileSdkVersion | ||
namespace "com.braintreepayments.cardform" | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.minSdkVersion | ||
targetSdkVersion rootProject.targetSdkVersion | ||
versionCode rootProject.versionCode | ||
versionName rootProject.versionName | ||
} | ||
|
||
testOptions { | ||
unitTests { | ||
includeAndroidResources true | ||
includeAndroidResources = true | ||
all { | ||
jvmArgs '-noverify' | ||
} | ||
} | ||
} | ||
|
||
|
@@ -26,18 +25,23 @@ android { | |
textOutput 'stdout' | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility versions.javaSourceCompatibility | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be Java 8 instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it's 8 I made the change here: b0d4a3d |
||
targetCompatibility versions.javaTargetCompatibility | ||
} | ||
|
||
resourcePrefix 'bt_' | ||
} | ||
|
||
dependencies { | ||
implementation 'com.google.android.material:material:1.0.0' | ||
implementation 'com.google.android.material:material:1.3.0' | ||
implementation 'com.google.android.flexbox:flexbox:3.0.0' | ||
implementation 'androidx.recyclerview:recyclerview:1.2.1' | ||
implementation 'androidx.recyclerview:recyclerview:1.3.2' | ||
|
||
testImplementation 'junit:junit:4.12' | ||
testImplementation 'org.mockito:mockito-core:2.8.9' | ||
testImplementation 'org.robolectric:robolectric:4.3' | ||
testImplementation 'androidx.test:core:1.4.0' | ||
testImplementation 'junit:junit:4.13.2' | ||
testImplementation 'org.mockito:mockito-core:5.7.0' | ||
testImplementation 'org.robolectric:robolectric:4.13' | ||
testImplementation 'androidx.test:core:1.6.1' | ||
} | ||
|
||
// region signing and publishing | ||
|
@@ -63,61 +67,12 @@ artifacts { | |
archives sourcesJar | ||
} | ||
|
||
signing { | ||
required { | ||
!version.endsWith("SNAPSHOT") && !version.endsWith("DEVELOPMENT") | ||
} | ||
sign publishing.publications | ||
} | ||
|
||
nexusPublishing { | ||
// give nexus sonatype more time to initialize the staging repository | ||
clientTimeout = Duration.ofMinutes(3) | ||
repositories { | ||
sonatype() | ||
} | ||
} | ||
project.ext.name = "card-form" | ||
project.ext.pom_name = "card-form" | ||
project.ext.group_id = "com.braintreepayments" | ||
project.ext.version = rootProject.version | ||
project.ext.pom_desc = "A ready-made card form layout that can be included in your Android app, making it easy to accept credit and debit cards." | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
from components.release | ||
|
||
groupId = 'com.braintreepayments' | ||
artifactId = 'card-form' | ||
version = rootProject.versionName | ||
|
||
pom { | ||
name = 'card-form' | ||
packaging = 'aar' | ||
description = 'A ready-made card form layout that can be included in your Android app, making it easy to accept credit and debit cards.' | ||
url = 'https://github.com/braintree/android-card-form' | ||
|
||
scm { | ||
url = 'scm:git@github.com:braintree/android-card-form.git' | ||
connection = 'scm:git@github.com:braintree/android-card-form.git' | ||
developerConnection = 'scm:git@github.com:braintree/android-card-form.git' | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'devs' | ||
name = 'Braintree Payments' | ||
} | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'MIT' | ||
url = 'http://opensource.org/licenses/MIT' | ||
distribution = 'repo' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
apply from: rootProject.file("gradle/gradle-publish.gradle") | ||
|
||
// endregion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest package="com.braintreepayments.cardform"> | ||
</manifest> | ||
<manifest /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<application> | ||
<activity | ||
android:name=".test.TestActivity" | ||
android:theme="@style/Theme.AppCompat" /> | ||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Java 17 required to compile card form now? Is this a breaking change then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be I don't see an explicit Java version specified in the
build.gradle
. I updated the build.gradle file to make it explicit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm trying to understand - can we support Android 15 without bumping the java version? Or are we doing a major version of card form here? I more so am concerned that this change will force a major version in drop-in which I don't think we want to do yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh got it yeah I forgot DropIn doesn't use v5 yet. AGP uses JDK 17 to build, but we can set
sourceCompatability
to Java 8 and it should be fine.