Skip to content

Commit fb943b5

Browse files
committed
Test
1 parent 8aed02d commit fb943b5

File tree

19 files changed

+126
-310
lines changed

19 files changed

+126
-310
lines changed

android/ijkplayer/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.0.1'
9+
classpath 'com.android.tools.build:gradle:8.2.0'
1010

1111
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1212
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'

android/ijkplayer/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ VERSION_NAME=0.8.8
2121
VERSION_CODE=800800
2222
GROUP=tv.danmaku.ijk.media
2323

24+
mavenCentralUsername=${IOT_SONATYPE_USERNAME}
25+
mavenCentralPassword=${IOT_SONATYPE_PASSWORD}
26+
2427
signing.keyId=MY_KEY_ID
2528
signing.password=MY_PASSWORD
2629
signing.secretKeyRingFile=MY_KEY_RING_FILE

android/ijkplayer/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
Lines changed: 30 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'maven-publish'
3-
apply plugin: 'signing'
1+
plugins {
2+
id 'com.android.library'
3+
id "com.vanniktech.maven.publish" version "0.33.0"
4+
}
45

56
android {
7+
namespace "tv.danmaku.ijk.media.player_arm64"
8+
// http://tools.android.com/tech-docs/new-build-system/user-guide/build-variants
69
// http://tools.android.com/tech-docs/new-build-system/tips
710
//noinspection GroovyAssignabilityCheck
811
compileSdkVersion rootProject.ext.compileSdkVersion
@@ -28,7 +31,7 @@ android {
2831
}
2932

3033
dependencies {
31-
compile fileTree(dir: 'libs', include: ['*.jar'])
34+
implementation fileTree(dir: 'libs', include: ['*.jar'])
3235
}
3336

3437
apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle");
@@ -46,91 +49,35 @@ task androidJavadocs(type: Javadoc) {
4649
exclude '**/R.html', '**/R.*.html', '**/index.html'
4750
}
4851

49-
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
50-
classifier = 'javadoc'
51-
from androidJavadocs.destinationDir
52-
}
53-
54-
task androidSourcesJar(type: Jar) {
55-
classifier = 'sources'
56-
from android.sourceSets.main.java.srcDirs
57-
}
58-
5952
def libVersion = rootProject.ext.sdk.version
6053
ext.isReleaseVersion = !libVersion.endsWith("SNAPSHOT")
61-
publishing {
62-
publications {
63-
aar(MavenPublication) {
64-
groupId 'com.tencent.iot.thirdparty.android'
65-
artifactId 'ijkplayer-arm64'
66-
version libVersion
67-
artifact(androidSourcesJar)
68-
artifact(androidJavadocsJar)
69-
artifact file('build/outputs/aar/ijkplayer-arm64-release.aar')
70-
71-
72-
pom {
73-
name = 'ijkplayer'
74-
description = 'Tencent Link Android library'
75-
url = 'https://github.com/tencentyun/iot-ijkplayer'
76-
licenses {
77-
license {
78-
name = 'Tencent Binary License'
79-
url = 'https://github.com/tencentyun/iot-link-android/blob/master/explorer-link-android/LICENSE'
80-
}
81-
}
82-
developers {
83-
developer {
84-
id = 'tencent_archurtan'
85-
name = 'Tencent archurtan'
86-
email = 'archurtan@tencent.com'
87-
}
88-
}
89-
scm {
90-
url = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
91-
connection = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
92-
developerConnection = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
93-
}
94-
}
54+
mavenPublishing {
9555

96-
pom.withXml {
97-
def dependenciesNode = asNode().appendNode('dependencies')
98-
configurations.implementation.allDependencies.withType(ModuleDependency) { ModuleDependency dp ->
99-
if (dp.version != "unspecified") { // 过滤项目内library引用
100-
def dependencyNode = dependenciesNode.appendNode('dependency')
101-
dependencyNode.appendNode('groupId', dp.group)
102-
dependencyNode.appendNode('artifactId', dp.name)
103-
dependencyNode.appendNode('version', dp.version)
56+
coordinates("com.tencent.iot.thirdparty.android", "ijkplayer-arm64", libVersion)
57+
publishToMavenCentral()
58+
signAllPublications()
10459

105-
// for exclusions
106-
if (dp.excludeRules.size() > 0) {
107-
def exclusions = dependencyNode.appendNode('exclusions')
108-
dp.excludeRules.each { ExcludeRule ex ->
109-
def exclusion = exclusions.appendNode('exclusion')
110-
exclusion.appendNode('groupId', ex.group)
111-
exclusion.appendNode('artifactId', ex.module)
112-
}
113-
}
114-
}
115-
}
60+
pom {
61+
name = 'ijkplayer'
62+
description = 'Tencent Link Android library'
63+
url = 'https://github.com/tencentyun/iot-ijkplayer'
64+
licenses {
65+
license {
66+
name = 'Tencent Binary License'
67+
url = 'https://github.com/tencentyun/iot-link-android/blob/master/explorer-link-android/LICENSE'
11668
}
11769
}
118-
}
119-
repositories {
120-
maven {
121-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
122-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
123-
url = libVersion.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
124-
credentials {
125-
username = System.getenv("IOT_SONATYPE_USERNAME")
126-
password = System.getenv("IOT_SONATYPE_PASSWORD")
70+
developers {
71+
developer {
72+
id = 'tencent_archurtan'
73+
name = 'Tencent archurtan'
74+
email = 'archurtan@tencent.com'
12775
}
12876
}
77+
scm {
78+
url = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
79+
connection = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
80+
developerConnection = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
81+
}
12982
}
130-
}
131-
132-
signing {
133-
if (isReleaseVersion) {
134-
sign publishing.publications.aar
135-
}
136-
}
83+
}

android/ijkplayer/ijkplayer-arm64/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="tv.danmaku.ijk.media.player_arm64">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43
<uses-sdk
54
android:minSdkVersion="21" />

android/ijkplayer/ijkplayer-armv5/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apply plugin: 'com.android.library'
22

33
android {
4+
namespace "tv.danmaku.ijk.media.player_armv5"
5+
// This is the same as the compileSdkVersion in the root build.gradle
46
// http://tools.android.com/tech-docs/new-build-system/tips
57
//noinspection GroovyAssignabilityCheck
68
compileSdkVersion rootProject.ext.compileSdkVersion
@@ -24,7 +26,7 @@ android {
2426
}
2527

2628
dependencies {
27-
compile fileTree(dir: 'libs', include: ['*.jar'])
29+
implementation fileTree(dir: 'libs', include: ['*.jar'])
2830
}
2931

3032
apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle");

android/ijkplayer/ijkplayer-armv5/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="tv.danmaku.ijk.media.player_armv5" >
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43
<uses-sdk
54
android:minSdkVersion="9" />
Lines changed: 28 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'maven-publish'
3-
apply plugin: 'signing'
1+
plugins {
2+
id 'com.android.library'
3+
id "com.vanniktech.maven.publish" version "0.33.0"
4+
}
45

56
android {
7+
namespace "tv.danmaku.ijk.media.player_armv7a"
68
// http://tools.android.com/tech-docs/new-build-system/tips
79
//noinspection GroovyAssignabilityCheck
810
compileSdkVersion rootProject.ext.compileSdkVersion
@@ -28,108 +30,40 @@ android {
2830
}
2931

3032
dependencies {
31-
compile fileTree(dir: 'libs', include: ['*.jar'])
33+
implementation fileTree(dir: 'libs', include: ['*.jar'])
3234
}
3335

3436
apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle");
3537

36-
37-
task androidJavadocs(type: Javadoc) {
38-
failOnError false
39-
source = android.sourceSets.main.java.srcDirs
40-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
41-
android.libraryVariants.all { variant ->
42-
if (variant.name == 'release') {
43-
owner.classpath += variant.javaCompile.classpath
44-
}
45-
}
46-
exclude '**/R.html', '**/R.*.html', '**/index.html'
47-
}
48-
49-
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
50-
classifier = 'javadoc'
51-
from androidJavadocs.destinationDir
52-
}
53-
54-
task androidSourcesJar(type: Jar) {
55-
classifier = 'sources'
56-
from android.sourceSets.main.java.srcDirs
57-
}
58-
5938
def libVersion = rootProject.ext.sdk.version
6039
ext.isReleaseVersion = !libVersion.endsWith("SNAPSHOT")
61-
publishing {
62-
publications {
63-
aar(MavenPublication) {
64-
groupId 'com.tencent.iot.thirdparty.android'
65-
artifactId 'ijkplayer-armv7a'
66-
version libVersion
67-
artifact(androidSourcesJar)
68-
artifact(androidJavadocsJar)
69-
artifact file('build/outputs/aar/ijkplayer-armv7a-release.aar')
70-
71-
pom {
72-
name = 'ijkplayer'
73-
description = 'Tencent Link Android library'
74-
url = 'https://github.com/tencentyun/iot-ijkplayer'
75-
licenses {
76-
license {
77-
name = 'Tencent Binary License'
78-
url = 'https://github.com/tencentyun/iot-link-android/blob/master/explorer-link-android/LICENSE'
79-
}
80-
}
81-
developers {
82-
developer {
83-
id = 'tencent_archurtan'
84-
name = 'Tencent archurtan'
85-
email = 'archurtan@tencent.com'
86-
}
87-
}
88-
scm {
89-
url = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
90-
connection = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
91-
developerConnection = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
92-
}
93-
}
40+
mavenPublishing {
9441

95-
pom.withXml {
96-
def dependenciesNode = asNode().appendNode('dependencies')
97-
configurations.implementation.allDependencies.withType(ModuleDependency) { ModuleDependency dp ->
98-
if (dp.version != "unspecified") { // 过滤项目内library引用
99-
def dependencyNode = dependenciesNode.appendNode('dependency')
100-
dependencyNode.appendNode('groupId', dp.group)
101-
dependencyNode.appendNode('artifactId', dp.name)
102-
dependencyNode.appendNode('version', dp.version)
42+
coordinates("com.tencent.iot.thirdparty.android", "ijkplayer-armv7a", libVersion)
43+
publishToMavenCentral()
44+
signAllPublications()
10345

104-
// for exclusions
105-
if (dp.excludeRules.size() > 0) {
106-
def exclusions = dependencyNode.appendNode('exclusions')
107-
dp.excludeRules.each { ExcludeRule ex ->
108-
def exclusion = exclusions.appendNode('exclusion')
109-
exclusion.appendNode('groupId', ex.group)
110-
exclusion.appendNode('artifactId', ex.module)
111-
}
112-
}
113-
}
114-
}
46+
pom {
47+
name = 'ijkplayer'
48+
description = 'Tencent Link Android library'
49+
url = 'https://github.com/tencentyun/iot-ijkplayer'
50+
licenses {
51+
license {
52+
name = 'Tencent Binary License'
53+
url = 'https://github.com/tencentyun/iot-link-android/blob/master/explorer-link-android/LICENSE'
11554
}
11655
}
117-
}
118-
repositories {
119-
maven {
120-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
121-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
122-
url = libVersion.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
123-
credentials {
124-
username = System.getenv("IOT_SONATYPE_USERNAME")
125-
password = System.getenv("IOT_SONATYPE_PASSWORD")
56+
developers {
57+
developer {
58+
id = 'tencent_archurtan'
59+
name = 'Tencent archurtan'
60+
email = 'archurtan@tencent.com'
12661
}
12762
}
128-
}
129-
}
130-
131-
signing {
132-
if (isReleaseVersion) {
133-
sign publishing.publications.aar
63+
scm {
64+
url = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
65+
connection = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
66+
developerConnection = 'scm:git@github.com:tencentyun/iot-ijkplayer.git'
67+
}
13468
}
13569
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="tv.danmaku.ijk.media.player_armv7a" >
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32

43
</manifest>

android/ijkplayer/ijkplayer-example/build.gradle

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4+
namespace "tv.danmaku.ijk.media.example"
45
// http://tools.android.com/tech-docs/new-build-system/tips
56
//noinspection GroovyAssignabilityCheck
67
compileSdkVersion rootProject.ext.compileSdkVersion
@@ -48,25 +49,25 @@ android {
4849
}
4950

5051
dependencies {
51-
compile fileTree(include: ['*.jar'], dir: 'libs')
52-
compile 'com.android.support:appcompat-v7:28.0.0'
53-
compile 'com.android.support:preference-v7:28.0.0'
54-
compile 'com.android.support:support-annotations:28.0.0'
52+
implementation fileTree(dir: 'libs', include: ['*.jar'])
53+
implementation 'com.android.support:appcompat-v7:28.0.0'
54+
implementation 'com.android.support:preference-v7:28.0.0'
55+
implementation 'com.android.support:support-annotations:28.0.0'
5556

56-
compile 'com.squareup:otto:1.3.8'
57+
implementation 'com.squareup:otto:1.3.8'
5758

58-
compile project(':ijkplayer-java')
59-
compile project(':ijkplayer-exo')
59+
implementation project(':ijkplayer-java')
60+
implementation project(':ijkplayer-exo')
6061

61-
all32Compile project(':ijkplayer-armv5')
62-
all32Compile project(':ijkplayer-armv7a')
63-
all32Compile project(':ijkplayer-x86')
62+
all32Implementation project(':ijkplayer-armv5')
63+
all32Implementation project(':ijkplayer-armv7a')
64+
all32Implementation project(':ijkplayer-x86')
6465

65-
all64Compile project(':ijkplayer-armv5')
66-
all64Compile project(':ijkplayer-armv7a')
67-
all64Compile project(':ijkplayer-arm64')
68-
all64Compile project(':ijkplayer-x86')
69-
all64Compile project(':ijkplayer-x86_64')
66+
all64Implementation project(':ijkplayer-armv5')
67+
all64Implementation project(':ijkplayer-armv7a')
68+
all64Implementation project(':ijkplayer-arm64')
69+
all64Implementation project(':ijkplayer-x86')
70+
all64Implementation project(':ijkplayer-x86_64')
7071

7172
// compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
7273
// compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'

0 commit comments

Comments
 (0)