File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed
main/kotlin/io/newm/server/features/song/repo
test/kotlin/io/newm/server/features/song Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,34 @@ protobuf {
7979 }
8080}
8181
82+ // work-around for protobuf plugin not registering generated sources properly.
83+ sourceSets {
84+ main {
85+ java {
86+ srcDirs(
87+ " build/generated/source/proto/main/java" ,
88+ " build/generated/source/proto/main/grpc" ,
89+ )
90+ }
91+ kotlin {
92+ srcDirs(
93+ " build/generated/source/proto/main/kotlin" ,
94+ " build/generated/source/proto/main/grpckt" ,
95+ )
96+ }
97+ }
98+ }
99+ afterEvaluate {
100+ tasks {
101+ // Ensure that generated sources are done before including them in the sources jar
102+ named<Jar >(" sourcesJar" ) {
103+ archiveClassifier.set(" sources" )
104+ from(sourceSets.main.get().allSource)
105+ dependsOn(" generateProto" )
106+ }
107+ }
108+ }
109+
82110signing {
83111 useGpgCmd()
84112}
Original file line number Diff line number Diff line change @@ -221,6 +221,8 @@ internal class SongRepositoryImpl(
221221 it.checkTitleUnique(songEntity.ownerId.value, songEntity.mintingStatus)
222222 }
223223 songEntity.title = it
224+ // We're assuming this is a single, so we also update the release title to match the song title.
225+ releaseEntity.title = it
224226 }
225227 genres?.let { songEntity.genres = it }
226228 moods?.let { songEntity.moods = it }
Original file line number Diff line number Diff line change @@ -855,6 +855,9 @@ class SongRoutesTests : BaseApplicationTests() {
855855 assertThat(song2.audioEncodingStatus).isEqualTo(AudioEncodingStatus .NotStarted )
856856 assertThat(song2.mintingStatus).isEqualTo(MintingStatus .Undistributed )
857857 assertThat(song2.marketplaceStatus).isEqualTo(MarketplaceStatus .NotSelling )
858+
859+ val release = transaction { ReleaseEntity [song2.releaseId!! ].toModel() }
860+ assertThat(release.title).isEqualTo(testSong2.title)
858861 }
859862
860863 @Test
You can’t perform that action at this time.
0 commit comments