diff --git a/dlna-core/build.gradle b/dlna-core/build.gradle index 3007e0e..5b532e1 100644 --- a/dlna-core/build.gradle +++ b/dlna-core/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } android { @@ -40,4 +41,5 @@ dependencies { } repositories { mavenCentral() -} \ No newline at end of file +} +apply from: './publish.gradle' \ No newline at end of file diff --git a/dlna-core/publish.gradle b/dlna-core/publish.gradle new file mode 100644 index 0000000..de8e2f0 --- /dev/null +++ b/dlna-core/publish.gradle @@ -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 + } + } + } +} \ No newline at end of file diff --git a/dlna-dmc/build.gradle b/dlna-dmc/build.gradle index 13bcdeb..a57a838 100644 --- a/dlna-dmc/build.gradle +++ b/dlna-dmc/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } android { @@ -33,4 +34,5 @@ dependencies { //noinspection GradleDependency implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" -} \ No newline at end of file +} +apply from: './publish.gradle' \ No newline at end of file diff --git a/dlna-dmc/publish.gradle b/dlna-dmc/publish.gradle new file mode 100644 index 0000000..949a0cf --- /dev/null +++ b/dlna-dmc/publish.gradle @@ -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 + } + } + } +} \ No newline at end of file diff --git a/dlna-dmr/build.gradle b/dlna-dmr/build.gradle index fbeaef7..f62bbd5 100644 --- a/dlna-dmr/build.gradle +++ b/dlna-dmr/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } android { @@ -31,4 +32,5 @@ dependencies { } repositories { mavenCentral() -} \ No newline at end of file +} +apply from: './publish.gradle' \ No newline at end of file diff --git a/dlna-dmr/publish.gradle b/dlna-dmr/publish.gradle new file mode 100644 index 0000000..042f663 --- /dev/null +++ b/dlna-dmr/publish.gradle @@ -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 + } + } + } +} \ No newline at end of file diff --git a/dlna-dms/build.gradle b/dlna-dms/build.gradle index 10da960..76d063a 100644 --- a/dlna-dms/build.gradle +++ b/dlna-dms/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } android { @@ -28,4 +29,5 @@ dependencies { api(project(':dlna-core')) //noinspection GradleDependency implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" -} \ No newline at end of file +} +apply from: './publish.gradle' \ No newline at end of file diff --git a/dlna-dms/publish.gradle b/dlna-dms/publish.gradle new file mode 100644 index 0000000..19104ce --- /dev/null +++ b/dlna-dms/publish.gradle @@ -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 + } + } + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 914a132..c1ca641 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file +GROUP=com.devin1014.dlna_cast +VERSION_DEBUG=2.0.0-SNAPSHOT +VERSION_RELEASE=2.0.0-SNAPSHOT \ No newline at end of file