-
Notifications
You must be signed in to change notification settings - Fork 87
feat: Modernize Project (AndroidX, Gradle 8.5) & Finalize Android 15 Support #170
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
Open
barissalihbabacan
wants to merge
33
commits into
ConnectSDK:master
Choose a base branch
from
barissalihbabacan:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
bfc45a0
Feat: Modernize build system and update Core submodule
barissalihbabacan 1b848fe
Fix: Add maven-publish plugin to enable JitPack builds
barissalihbabacan 71ffa6b
Fix: Finalize build fixes for JitPack compatibility
barissalihbabacan 881de78
Refactor build.gradle and update dependencies
barissalihbabacan c40ef4d
Fix: Resolve critical build errors and add missing dependencies
barissalihbabacan 174e9de
Refactor build.gradle for conciseness and modern practices
barissalihbabacan 0df02e2
Remove lgcast-android-lib.jar.jar
barissalihbabacan 82951c4
Add localbroadcastmanager dependency
barissalihbabacan 194f46a
Simplify `sourceSets` and add `useLibrary 'org.apache.http.legacy'`
barissalihbabacan 2649bdb
Enable BuildConfig generation
barissalihbabacan 7b8c342
Refactor: Remove BuildConfig usage and update foreground service start
barissalihbabacan 79615f0
Update dependencies and simplify build.gradle
barissalihbabacan e09d3a7
Downgrade Java-WebSocket and move dependencies
barissalihbabacan e96281b
Update test dependencies and `DiscoveryManager` initialization
barissalihbabacan 5c0f65f
Refactor: Update test dependencies and migrate to AndroidX Test APIs
barissalihbabacan 40ba4e2
Add group and version to build scripts
barissalihbabacan b553dbb
Add Maven publishing configuration
barissalihbabacan 40f2b77
Remove publishing configuration from build.gradle files
barissalihbabacan 6763dbf
Refactor build scripts and add Maven local publishing
barissalihbabacan 8dd7c61
Refactor Gradle setup and update dependencies
barissalihbabacan 9cca30d
Refactor Gradle configuration and update dependencies
barissalihbabacan aa0b673
Add Maven publishing for core module and update JitPack build
barissalihbabacan ebce4e5
Update build.gradle
barissalihbabacan 2b65235
Update dependencies and streamline publishing
barissalihbabacan d381432
Refactor: Modernize Gradle structure and add POM for core module
barissalihbabacan f2b21c6
Refactor: Streamline source sets and update HttpClient dependency
barissalihbabacan 89fb1e1
Refactor: Standardize build scripts and update dependencies
barissalihbabacan a53fd42
Refactor: Update Android Gradle Plugin and Apache HTTP Client
barissalihbabacan c683e4a
Refactor: Streamline build configuration and dependency management
barissalihbabacan ac32f9d
Update libc++_shared.so for arm64-v8a and armeabi-v7a
barissalihbabacan b41fffa
Refactor: Update source sets and dependencies for module integration
barissalihbabacan 41f29c8
feat: Integrate official Android 15 (16KB) aligned native binaries
barissalihbabacan 22fc284
Merge remote-tracking branch 'upstream/master'
barissalihbabacan 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 hidden or 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 hidden or 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,73 +1,115 @@ | ||
| buildscript { | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| } | ||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:4.0.1' | ||
| } | ||
| } | ||
|
|
||
| allprojects { | ||
| repositories { | ||
| google() | ||
| mavenCentral() | ||
| } | ||
| plugins { | ||
| id 'com.android.library' | ||
| id 'kotlin-android' | ||
| id 'maven-publish' | ||
| } | ||
|
|
||
| apply plugin: 'com.android.library' | ||
| group = 'com.github.Astro-bosss' | ||
|
|
||
| android { | ||
| compileSdkVersion 31 | ||
| buildToolsVersion '30.0.3' | ||
| namespace 'com.connectsdk' | ||
| compileSdk 34 | ||
|
|
||
| packagingOptions { | ||
| exclude 'LICENSE.txt' | ||
| exclude 'META-INF/LICENSE' | ||
| exclude 'META-INF/LICENSE.txt' | ||
| exclude 'META-INF/NOTICE' | ||
| useLibrary 'org.apache.http.legacy' | ||
|
|
||
| defaultConfig { | ||
| minSdk 24 | ||
| targetSdk 34 | ||
| } | ||
|
|
||
| sourceSets { | ||
| main { | ||
| manifest.srcFile 'AndroidManifest.xml' | ||
| java.srcDirs = [ | ||
| 'src', | ||
| 'core/src', | ||
| 'modules/google_cast/src' | ||
| '../modules/google_cast/src', | ||
| '../modules/firetv/src' | ||
| ] | ||
| resources.srcDirs = ['src'] | ||
| aidl.srcDirs = ['src'] | ||
| renderscript.srcDirs = ['src'] | ||
| res.srcDirs = ['res'] | ||
| jniLibs.srcDirs = ['jniLibs'] | ||
| assets.srcDirs = ['assets'] | ||
| } | ||
| androidTest { | ||
| java.srcDirs = [ | ||
| 'core/test/src', | ||
| 'modules/google_cast/test/src' | ||
| ] | ||
| } | ||
| } | ||
| buildTypes { | ||
| release { | ||
| minifyEnabled false | ||
| } | ||
|
|
||
| buildFeatures { | ||
| buildConfig true | ||
| } | ||
| defaultConfig { | ||
| minSdkVersion 24 | ||
| targetSdkVersion 31 | ||
|
|
||
| packagingOptions { | ||
| resources.excludes += '/META-INF/{AL2.0,LGPL2.1}' | ||
| } | ||
|
|
||
| useLibrary 'org.apache.http.legacy' | ||
| compileOptions { | ||
| sourceCompatibility JavaVersion.VERSION_1_8 | ||
| targetCompatibility JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| publishing { | ||
| singleVariant('release') { | ||
| withSourcesJar() | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation 'org.java-websocket:Java-WebSocket:1.3.9' | ||
| implementation 'javax.jmdns:jmdns:3.4.1' | ||
| implementation 'androidx.preference:preference:1.1.1' | ||
| implementation 'com.google.android.gms:play-services-cast:19.0.0' | ||
| implementation 'com.googlecode.plist:dd-plist:1.23' | ||
| implementation 'com.nimbusds:srp6a:2.1.0' | ||
| implementation 'net.i2p.crypto:eddsa:0.3.0' | ||
| // Projenin diğer tüm bağımlılıkları | ||
| implementation "org.jetbrains.kotlin:kotlin-stdlib" | ||
| implementation fileTree(dir: "libs", include: ["*.jar"]) | ||
| implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0" | ||
| implementation "org.java-websocket:Java-WebSocket:1.5.7" | ||
| implementation "org.jmdns:jmdns:3.5.9" | ||
| implementation "androidx.preference:preference:1.2.1" | ||
| implementation "com.google.android.gms:play-services-cast-framework:21.4.0" | ||
| implementation "com.googlecode.plist:dd-plist:1.28" | ||
| implementation "com.nimbusds:srp6a:2.1.0" | ||
| implementation "net.i2p.crypto:eddsa:0.3.0" | ||
| implementation 'androidx.mediarouter:mediarouter:1.6.0' | ||
| implementation 'androidx.appcompat:appcompat:1.6.1' | ||
|
|
||
| implementation fileTree(dir: '../modules/firetv/libs', include: ['*.jar']) | ||
| } | ||
|
|
||
| // Manuel 'task sourcesJar' görevine artık ihtiyacımız yok, çünkü yukarıdaki | ||
| // 'android.publishing' bloğu bu işi otomatik ve hatasız yapıyor. | ||
|
|
||
| afterEvaluate { | ||
| publishing { | ||
| publications { | ||
| release(MavenPublication) { | ||
| // 'from components.release' komutu, AGP'nin 'publishing' bloğunda | ||
| // hazırladığı hem .aar hem de -sources.jar dosyalarını otomatik olarak alır. | ||
| from components.release | ||
|
|
||
| // 'group' yukarıda tanımlandığı için buradan okunacak | ||
| artifactId = "Connect-SDK-Android" | ||
| version = project.findProperty("version") ?: "1.0.0-SNAPSHOT" | ||
|
|
||
| // 'artifact(sourcesJar)' satırına artık gerek yok. | ||
|
|
||
| // Otomatik olarak oluşturulacak pom.xml dosyasının içeriği | ||
| pom { | ||
| name = "Connect SDK Android" | ||
| description = "Modernized fork of Connect SDK for Android to support AndroidX and modern Gradle." | ||
| url = "https://github.com/Astro-bosss/Connect-SDK-Android" | ||
| licenses { | ||
| license { | ||
| name = 'The Apache License, Version 2.0' | ||
| url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
| } | ||
| } | ||
| developers { | ||
| developer { | ||
| id = 'Astro-bosss' | ||
| name = 'Baris Salih Babacan' | ||
| } | ||
| } | ||
| scm { | ||
| connection = 'scm:git:github.com/Astro-bosss/Connect-SDK-Android.git' | ||
| developerConnection = 'scm:git:ssh://github.com/Astro-bosss/Connect-SDK-Android.git' | ||
| url = 'https://github.com/Astro-bosss/Connect-SDK-Android/tree/master' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Binary file not shown.
Binary file not shown.
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| import android.content.Intent; | ||
| import android.content.pm.ServiceInfo; | ||
| import android.content.res.Configuration; | ||
| import android.os.Build; | ||
| import android.os.IBinder; | ||
| import android.util.Size; | ||
| import android.view.Surface; | ||
|
|
@@ -62,7 +63,7 @@ public class CameraService extends Service { | |
| @Override | ||
| public void onCreate() { | ||
| super.onCreate(); | ||
| Logger.showDebug(com.connectsdk.BuildConfig.DEBUG); | ||
| //Logger.showDebug(com.connectsdk.BuildConfig.DEBUG); | ||
| mServiceHandler = new HandlerThreadEx("CameraService Handler"); | ||
| mServiceHandler.start(); | ||
| } | ||
|
|
@@ -276,7 +277,7 @@ private void sendSetParameterResponse(boolean result, @NonNull JSONObject camera | |
|
|
||
| Logger.print("executeStart"); | ||
| start(intent, connectionListener); | ||
| if (com.connectsdk.BuildConfig.DEBUG == true) AppUtil.showToastLong(this, "########## DEBUG version ##########"); | ||
| //if (com.connectsdk.BuildConfig.DEBUG == true) AppUtil.showToastLong(this, "########## DEBUG version ##########"); | ||
|
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. add to gradle |
||
| } | ||
|
|
||
| private void executeStop() { | ||
|
|
@@ -365,7 +366,9 @@ private void stop() { | |
|
|
||
| private void initializeService(@NonNull Intent intent) { | ||
| Logger.print("initializeService (SDK version=%s)", IOUtil.readRawResourceText(this, R.raw.lgcast_version)); | ||
| startForeground(RemoteCameraConfig.Notification.ID, CameraServiceFunc.createNotification(this), ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE); | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { | ||
| startForeground(RemoteCameraConfig.Notification.ID, CameraServiceFunc.createNotification(this), ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE); | ||
| } | ||
| } | ||
|
|
||
| private void terminateService() { | ||
|
|
||
This file contains hidden or 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.
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.