Skip to content

Commit

Permalink
添加publish.gradle文件
Browse files Browse the repository at this point in the history
  • Loading branch information
LIUWEI committed Aug 7, 2023
1 parent d7bd1df commit a6dc6b4
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 6 deletions.
4 changes: 3 additions & 1 deletion dlna-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
}

android {
Expand Down Expand Up @@ -40,4 +41,5 @@ dependencies {
}
repositories {
mavenCentral()
}
}
apply from: './publish.gradle'
25 changes: 25 additions & 0 deletions dlna-core/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = GROUP
artifactId = 'core'
version = VERSION_RELEASE
}
// Creates a Maven publication called “debug”.
debug(MavenPublication) {
// Applies the component for the debug build variant.
from components.debug
groupId = GROUP
artifactId = 'core'
version = VERSION_DEBUG
}
}
}
}
4 changes: 3 additions & 1 deletion dlna-dmc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
}

android {
Expand Down Expand Up @@ -33,4 +34,5 @@ dependencies {

//noinspection GradleDependency
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
}
apply from: './publish.gradle'
25 changes: 25 additions & 0 deletions dlna-dmc/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = GROUP
artifactId = 'dmc'
version = VERSION_RELEASE
}
// Creates a Maven publication called “debug”.
debug(MavenPublication) {
// Applies the component for the debug build variant.
from components.debug
groupId = GROUP
artifactId = 'dmc'
version = VERSION_DEBUG
}
}
}
}
4 changes: 3 additions & 1 deletion dlna-dmr/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
}

android {
Expand Down Expand Up @@ -31,4 +32,5 @@ dependencies {
}
repositories {
mavenCentral()
}
}
apply from: './publish.gradle'
25 changes: 25 additions & 0 deletions dlna-dmr/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = GROUP
artifactId = 'dmr'
version = VERSION_RELEASE
}
// Creates a Maven publication called “debug”.
debug(MavenPublication) {
// Applies the component for the debug build variant.
from components.debug
groupId = GROUP
artifactId = 'dmr'
version = VERSION_DEBUG
}
}
}
}
4 changes: 3 additions & 1 deletion dlna-dms/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
}

android {
Expand Down Expand Up @@ -28,4 +29,5 @@ dependencies {
api(project(':dlna-core'))
//noinspection GradleDependency
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
}
apply from: './publish.gradle'
25 changes: 25 additions & 0 deletions dlna-dms/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = GROUP
artifactId = 'dms'
version = VERSION_RELEASE
}
// Creates a Maven publication called “debug”.
debug(MavenPublication) {
// Applies the component for the debug build variant.
from components.debug
groupId = GROUP
artifactId = 'dms'
version = VERSION_DEBUG
}
}
}
}
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#GROUP=com.liuwei.android.media
#VERSION=5.5.4-SNAPSHOT
GROUP=com.devin1014.dlna_cast
VERSION_DEBUG=2.0.0-SNAPSHOT
VERSION_RELEASE=2.0.0-SNAPSHOT

0 comments on commit a6dc6b4

Please sign in to comment.