Skip to content

Commit

Permalink
Add support for Android 15 (#76)
Browse files Browse the repository at this point in the history
* Initial commit.


---------

Co-authored-by: Advait Mahashabde <[email protected]>
  • Loading branch information
advait8 and li-advait authored Nov 13, 2024
1 parent a514829 commit d809bf7
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 28 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/merge-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
steps:
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Checkout Repo
uses: actions/checkout@v2

Expand Down
10 changes: 4 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ buildscript {
repositories {
google()
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.1'
classpath 'com.android.tools.build:gradle:8.7.2'
}
}

Expand All @@ -16,16 +15,15 @@ subprojects {
repositories {
google()
mavenCentral()
jcenter()
}

group = GROUP_ID
version = VERSION_NAME
}

ext {
compileSdkVersion = 31
buildToolsVersion = '31.0.0'
compileSdkVersion = 35
buildToolsVersion = '35.0.0'
minSdkVersion = 21
targetSdkVersion = 30
targetSdkVersion = 35
}
10 changes: 4 additions & 6 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'signing'
// Ideally AGP should provide sources and javadoc integration for their components:
// https://issuetracker.google.com/issues/145670440
tasks.register("sourcesJar", Jar) {
classifier 'sources'
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}

Expand All @@ -16,7 +16,7 @@ tasks.register("javadoc", Javadoc) {

tasks.register("javadocJar", Jar) {
dependsOn javadoc
classifier 'javadoc'
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}

Expand All @@ -25,12 +25,10 @@ tasks.register("javadocJar", Jar) {
afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
from components.release

maven(MavenPublication){
from(components["release"])
artifact sourcesJar
artifact javadocJar

pom {
name = 'Shaky'
description = 'Shake-to-send-feedback library for Android'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions shaky-sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'com.android.application'

android {
namespace "com.linkedin.android.shaky.app"
compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
Expand Down
6 changes: 3 additions & 3 deletions shaky-sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.linkedin.android.shaky.app"
xmlns:android="http://schemas.android.com/apk/res/android"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- for MultipleAttachmentShakeDelegate example -->
<uses-permission android:name="android.permission.READ_LOGS"
Expand All @@ -16,7 +15,8 @@

<activity
android:name=".ShakyDemo"
android:label="@string/app_name">
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down
3 changes: 1 addition & 2 deletions shaky-sample/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
Expand Down Expand Up @@ -44,5 +44,4 @@
<item name="shakyPopupTitleColor">@android:color/white</item>
<item name="shakyPopupContentColor">@android:color/white</item>
</style>

</resources>
19 changes: 12 additions & 7 deletions shaky/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ apply plugin: 'com.android.library'
apply from: "$rootDir/gradle/publishing.gradle"

android {
compileSdkVersion rootProject.ext.compileSdkVersion
namespace "com.linkedin.android.shaky"
compileSdk rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -23,6 +24,10 @@ android {
}
}

publishing {
singleVariant("release")
}

lintOptions {
abortOnError true
}
Expand All @@ -33,13 +38,13 @@ android {
dependencies {
api 'com.squareup:seismic:1.0.3'
implementation 'com.jraska:falcon:2.2.0'
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "com.google.android.material:material:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.appcompat:appcompat:1.7.0"
implementation "com.google.android.material:material:1.12.0"
implementation "androidx.recyclerview:recyclerview:1.3.2"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.annotation:annotation:1.6.0"
implementation "androidx.annotation:annotation:1.9.1"

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.robolectric:robolectric:4.9.2'
testImplementation 'org.mockito:mockito-core:5.14.2'
testImplementation 'org.robolectric:robolectric:4.13'
}
3 changes: 1 addition & 2 deletions shaky/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest package="com.linkedin.android.shaky"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application android:supportsRtl="true">
<activity android:name="com.linkedin.android.shaky.FeedbackActivity" />
Expand Down
5 changes: 4 additions & 1 deletion shaky/src/main/res/values/shaky_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="ShakyBaseAlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:colorBackground">?attr/shakyBackgroundColor</item>
Expand Down Expand Up @@ -70,6 +70,9 @@
<item name="shakyAlertDialogTheme">@style/ShakyBaseAlertDialogTheme</item>
<item name="alertDialogTheme">?attr/shakyAlertDialogTheme</item>
<item name="materialAlertDialogTheme">?attr/shakyAlertDialogTheme</item>

<!-- Opt out of Edge to Edge enforcement required from Android 15 -->
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
</style>

<style name="ShakyBasePopupTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
Expand Down

0 comments on commit d809bf7

Please sign in to comment.